1
0
Fork 0

optimization on speed

This commit is contained in:
Inuyaksa 2021-02-14 23:11:52 +01:00
parent 16f14691ce
commit 384c629db0
2 changed files with 5 additions and 2 deletions

View file

@ -222,6 +222,8 @@ var clear = func {
}
var draw = func {
if(me.fetching) return;
var range = me.layer.map.getRange(); # Range of Navigation Display
var update_size = (range != me.range);
@ -238,6 +240,7 @@ var draw = func {
me.terrain_visible.setValue(1);
}
me.updateTerrain(r_scaled);
me.updateTerrain(r_scaled); # left
if (math.mod(me.radar_beacon,2)==1) me.updateTerrain(r_scaled); # right
};

View file

@ -90,7 +90,7 @@ canvas.NDStyles["Airbus"] = {
{
name:"TERRAIN",
isMapStructure: 1,
update_on:[ {rate_hz: 18}, "toggle_range","toggle_display_mode","toggle_terrain"],
update_on:[ {rate_hz: 10}, "toggle_range","toggle_display_mode","toggle_terrain"],
predicate: func(nd, layer) {
#print("TERRAIN TOGGLE: " ~ nd.get_switch("toggle_terrain"));
var visible = nd.get_switch("toggle_terrain") and