1
0
Fork 0

Also on RHS ND

This commit is contained in:
legoboyvdlp R 2020-10-22 16:47:38 +01:00
parent 0f4f39e04a
commit 42a17b5149
3 changed files with 16 additions and 2 deletions

View file

@ -1722,6 +1722,10 @@
<max-range-m type="int">1219</max-range-m>
<serviceable type="bool">true</serviceable>
</radar-altimeter>
<wxr>
<enabled type="bool">false</enabled>
</wxr>
</instrumentation>
<modes>

View file

@ -8473,7 +8473,11 @@
</binding>
<binding>
<command>property-toggle</command>
<property>/instrumentation/efis[0]/nd/wxr-live-enabled</property>
<property>/instrumentation/efis[1]/inputs/wxr</property>
</binding>
<binding>
<command>property-toggle</command>
<property>/instrumentation/wxr/enabled</property>
</binding>
<binding>
<command>nasal</command>
@ -8486,7 +8490,7 @@
<type>rotate</type>
<object-name>radar_sys</object-name>
<factor>-20</factor>
<property>/instrumentation/efis[0]/inputs/wxr</property>
<property>/instrumentation/wxr/enabled</property>
<center>
<x-m>0.020282</x-m>
<y-m>-0.210647</y-m>

View file

@ -335,6 +335,12 @@ canvas.NavDisplay.update_sub = func(){
canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft specific, cannot easily be reused by other aircraft
{
var _time = systime();
# Disables WXR Live if it's not enabled. The toggle_weather_live should be common to all
# ND instances.
var wxr_live_enabled = getprop(wxr_live_tree~'/enabled');
if(wxr_live_enabled == nil or wxr_live_enabled == '')
wxr_live_enabled = 0;
me.set_switch('toggle_weather_live', wxr_live_enabled);
call(me.update_sub, nil, nil, caller(0)[0]); # call this in the same namespace to "steal" its variables
# MapStructure update!