Merge branch 'master' into dev

This commit is contained in:
Joshua Davidson 2018-10-27 16:16:16 -04:00
commit 2c57319ef8
4 changed files with 16 additions and 10 deletions

View file

@ -451,10 +451,10 @@
<payload> <payload>
<weight n="0"> <weight n="0">
<name>Crew</name> <name>Cockpit Crew</name>
<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[0]"/> <weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[0]"/>
<min-lb type="double">280</min-lb> <min-lb type="double">200</min-lb>
<max-lb type="double">840</max-lb> <max-lb type="double">440</max-lb>
</weight> </weight>
<weight n="1"> <weight n="1">
<name>Passengers</name> <name>Passengers</name>

View file

@ -161,23 +161,31 @@ var update_stby_vhf = func(rmp_no, vhf) {
var stby = sprintf("%3.3f", stby_rmp1_vhf1.getValue()); var stby = sprintf("%3.3f", stby_rmp1_vhf1.getValue());
} else if (vhf == 2) { } else if (vhf == 2) {
var stby = sprintf("%3.3f", stby_rmp1_vhf2.getValue()); var stby = sprintf("%3.3f", stby_rmp1_vhf2.getValue());
} else { } else if (vhf == 3) {
var stby = sprintf("%3.3f", stby_rmp1_vhf3.getValue()); var stby = sprintf("%3.3f", stby_rmp1_vhf3.getValue());
} }
if (stby == 0) {
stby_display_rmp1.setValue("data");
} else {
stby_display_rmp1.setValue(stby); stby_display_rmp1.setValue(stby);
}
} else { } else {
if (vhf == 1) { if (vhf == 1) {
var stby = sprintf("%3.3f", stby_rmp2_vhf1.getValue()); var stby = sprintf("%3.3f", stby_rmp2_vhf1.getValue());
} else if (vhf == 2) { } else if (vhf == 2) {
var stby = sprintf("%3.3f", stby_rmp2_vhf2.getValue()); var stby = sprintf("%3.3f", stby_rmp2_vhf2.getValue());
} else { } else if (vhf == 3) {
var stby = sprintf("%3.3f", stby_rmp2_vhf3.getValue()); var stby = sprintf("%3.3f", stby_rmp2_vhf3.getValue());
} }
if (stby == 0) {
stby_display_rmp2.setValue("data");
} else {
stby_display_rmp2.setValue(stby); stby_display_rmp2.setValue(stby);
} }
} }
}
var update_chan_sel = func(rmp_no) { var update_chan_sel = func(rmp_no) {
update_active_vhf(1); update_active_vhf(1);
@ -229,7 +237,6 @@ var transfer = func(rmp_no) {
} }
} }
setlistener("/systems/radio/rmp[0]/vhf1-standby", func { setlistener("/systems/radio/rmp[0]/vhf1-standby", func {
update_stby_vhf(0, 1); update_stby_vhf(0, 1);
}); });

View file

@ -23,7 +23,6 @@
<z> 0.19249 </z> <z> 0.19249 </z>
</location> </location>
<!-- average human weight 145 lbs, max 44000 lb -->
<pointmass name="Crew"> <pointmass name="Crew">
<weight unit="LBS">380</weight> <weight unit="LBS">380</weight>
<location name="POINTMASS" unit="M"> <location name="POINTMASS" unit="M">

View file

@ -1 +1 @@
4687 4689