2016-02-10 21:32:19 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<PropertyList>
|
|
|
|
|
|
|
|
<name>c172p-left-fuel-dialog</name>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
<resizable>false</resizable>
|
|
|
|
<modal>false</modal>
|
|
|
|
<draggable>true</draggable>
|
|
|
|
|
2021-09-14 18:34:27 +00:00
|
|
|
<nasal>
|
|
|
|
<open>
|
|
|
|
# Fuel tanks being used
|
|
|
|
var integral_tanks = getprop("/fdm/jsbsim/fuel/tank");
|
|
|
|
if (integral_tanks) {
|
|
|
|
setprop("/consumables/fuel/left/level-norm", getprop("/consumables/fuel/tank[2]/level-norm"));
|
|
|
|
setprop("/consumables/fuel/left/level-gal_us", getprop("/consumables/fuel/tank[2]/level-gal_us"));
|
|
|
|
setprop("/consumables/fuel/left/level-lbs", getprop("/consumables/fuel/tank[2]/level-lbs"));
|
|
|
|
setprop("/consumables/fuel/left/level-litres", getprop("/consumables/fuel/tank[2]/level-litres"));
|
|
|
|
} else {
|
|
|
|
setprop("/consumables/fuel/left/level-norm", getprop("/consumables/fuel/tank[0]/level-norm"));
|
|
|
|
setprop("/consumables/fuel/left/level-gal_us", getprop("/consumables/fuel/tank[0]/level-gal_us"));
|
|
|
|
setprop("/consumables/fuel/left/level-lbs", getprop("/consumables/fuel/tank[0]/level-lbs"));
|
|
|
|
setprop("/consumables/fuel/left/level-litres", getprop("/consumables/fuel/tank[0]/level-litres"));
|
|
|
|
}
|
|
|
|
</open>
|
|
|
|
</nasal>
|
|
|
|
|
2016-02-10 21:32:19 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
|
|
|
|
<empty><stretch>true</stretch></empty>
|
|
|
|
<text>
|
|
|
|
<label>Left Fuel Tank</label>
|
|
|
|
</text>
|
|
|
|
<empty><stretch>true</stretch></empty>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<legend/>
|
|
|
|
<key>Esc</key>
|
|
|
|
<pref-width>16</pref-width>
|
|
|
|
<pref-height>16</pref-height>
|
2018-05-17 11:58:44 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
setprop("sim/model/open-pfuel-cap", 0);
|
|
|
|
</script>
|
|
|
|
</binding>
|
2016-02-10 21:32:19 +00:00
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<hrule/>
|
2018-09-02 19:58:05 +00:00
|
|
|
|
2016-02-10 21:32:19 +00:00
|
|
|
<group>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
<padding>6</padding>
|
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<text>
|
|
|
|
<label>Left Fuel Tank:</label>
|
|
|
|
<halign>left</halign>
|
|
|
|
</text>
|
|
|
|
<slider>
|
|
|
|
<name>c172p-left-fuel-slider</name>
|
|
|
|
<min>0</min>
|
2021-09-14 18:34:27 +00:00
|
|
|
<max>1</max>
|
2016-02-10 21:32:19 +00:00
|
|
|
<live>true</live>
|
|
|
|
<enable>
|
2017-02-17 09:04:00 +00:00
|
|
|
<and>
|
|
|
|
<or>
|
|
|
|
<property>/fdm/jsbsim/gear/unit[1]/WOW</property>
|
|
|
|
<property>/fdm/jsbsim/gear/unit[19]/WOW</property>
|
|
|
|
<property>/fdm/jsbsim/gear/unit[23]/WOW</property>
|
|
|
|
<property>/fdm/jsbsim/hydro/active-norm</property>
|
|
|
|
</or>
|
|
|
|
<not>
|
|
|
|
<property>/engines/active-engine/running</property>
|
|
|
|
</not>
|
|
|
|
</and>
|
2016-02-10 21:32:19 +00:00
|
|
|
</enable>
|
2021-09-14 18:34:27 +00:00
|
|
|
<property>/consumables/fuel/left/level-norm</property>
|
2016-02-10 21:32:19 +00:00
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
2021-09-14 18:34:27 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
# Fuel tanks being used
|
|
|
|
var integral_tanks = getprop("/fdm/jsbsim/fuel/tank");
|
|
|
|
if (integral_tanks) {
|
|
|
|
setprop("/consumables/fuel/tank[2]/level-norm", getprop("/consumables/fuel/left/level-norm"));
|
|
|
|
setprop("/consumables/fuel/left/level-gal_us", getprop("/consumables/fuel/tank[2]/level-gal_us"));
|
|
|
|
setprop("/consumables/fuel/left/level-lbs", getprop("/consumables/fuel/tank[2]/level-lbs"));
|
|
|
|
setprop("/consumables/fuel/left/level-litres", getprop("/consumables/fuel/tank[2]/level-litres"));
|
|
|
|
} else {
|
|
|
|
setprop("/consumables/fuel/tank[0]/level-norm", getprop("/consumables/fuel/left/level-norm"));
|
|
|
|
setprop("/consumables/fuel/left/level-gal_us", getprop("/consumables/fuel/tank[0]/level-gal_us"));
|
|
|
|
setprop("/consumables/fuel/left/level-lbs", getprop("/consumables/fuel/tank[0]/level-lbs"));
|
|
|
|
setprop("/consumables/fuel/left/level-litres", getprop("/consumables/fuel/tank[0]/level-litres"));
|
|
|
|
}
|
|
|
|
</script>
|
2016-02-10 21:32:19 +00:00
|
|
|
</binding>
|
|
|
|
</slider>
|
|
|
|
<group>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
<padding>6</padding>
|
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<padding>6</padding>
|
|
|
|
<text>
|
|
|
|
<label>1234</label>
|
|
|
|
<halign>left</halign>
|
|
|
|
<format>%.2f</format>
|
|
|
|
<live>true</live>
|
2021-09-14 18:34:27 +00:00
|
|
|
<property>/consumables/fuel/left/level-gal_us</property>
|
2016-02-10 21:32:19 +00:00
|
|
|
</text>
|
|
|
|
<text>
|
|
|
|
<label>gallons</label>
|
|
|
|
<halign>left</halign>
|
|
|
|
</text>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<padding>6</padding>
|
|
|
|
<text>
|
|
|
|
<label>1234</label>
|
|
|
|
<halign>left</halign>
|
|
|
|
<format>%.1f</format>
|
|
|
|
<live>true</live>
|
2021-09-14 18:34:27 +00:00
|
|
|
<property>/consumables/fuel/left/level-lbs</property>
|
2016-02-10 21:32:19 +00:00
|
|
|
</text>
|
|
|
|
<text>
|
|
|
|
<label>pounds</label>
|
|
|
|
<halign>left</halign>
|
|
|
|
</text>
|
|
|
|
</group>
|
2018-09-02 19:58:05 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<padding>6</padding>
|
|
|
|
<text>
|
|
|
|
<label>1234</label>
|
|
|
|
<halign>left</halign>
|
|
|
|
<format>%.2f</format>
|
|
|
|
<live>true</live>
|
2021-09-14 18:34:27 +00:00
|
|
|
<property>/consumables/fuel/left/level-litres</property>
|
2018-09-02 19:58:05 +00:00
|
|
|
</text>
|
|
|
|
<text>
|
|
|
|
<label>litres</label>
|
|
|
|
<halign>left</halign>
|
|
|
|
</text>
|
|
|
|
</group>
|
2016-02-10 21:32:19 +00:00
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
</group>
|
2018-09-02 19:58:05 +00:00
|
|
|
|
2016-02-10 21:32:19 +00:00
|
|
|
<group>
|
2017-02-17 09:04:00 +00:00
|
|
|
<layout>table</layout>
|
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<visible>
|
|
|
|
<and>
|
|
|
|
<or>
|
|
|
|
<property>/fdm/jsbsim/gear/unit[1]/WOW</property>
|
|
|
|
<property>/fdm/jsbsim/gear/unit[19]/WOW</property>
|
|
|
|
<property>/fdm/jsbsim/gear/unit[23]/WOW</property>
|
|
|
|
<property>/fdm/jsbsim/hydro/active-norm</property>
|
|
|
|
</or>
|
|
|
|
<property>/engines/active-engine/running</property>
|
|
|
|
</and>
|
|
|
|
</visible>
|
|
|
|
<color>
|
|
|
|
<red>0.9</red>
|
|
|
|
<green>0.1</green>
|
|
|
|
<blue>0.1</blue>
|
|
|
|
</color>
|
|
|
|
<label>Slider disabled while engine is running!</label>
|
|
|
|
</text>
|
2016-02-10 21:32:19 +00:00
|
|
|
<text>
|
2017-02-17 09:04:00 +00:00
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
2016-02-10 21:32:19 +00:00
|
|
|
<visible>
|
2017-02-17 09:04:00 +00:00
|
|
|
<not>
|
|
|
|
<or>
|
|
|
|
<property>/fdm/jsbsim/gear/unit[1]/WOW</property>
|
|
|
|
<property>/fdm/jsbsim/gear/unit[19]/WOW</property>
|
|
|
|
<property>/fdm/jsbsim/gear/unit[23]/WOW</property>
|
|
|
|
<property>/fdm/jsbsim/hydro/active-norm</property>
|
|
|
|
</or>
|
|
|
|
</not>
|
2016-02-10 21:32:19 +00:00
|
|
|
</visible>
|
|
|
|
<color>
|
|
|
|
<red>0.9</red>
|
|
|
|
<green>0.1</green>
|
|
|
|
<blue>0.1</blue>
|
|
|
|
</color>
|
2017-02-17 09:04:00 +00:00
|
|
|
<label>Slider disabled while in the air!</label>
|
2016-02-10 21:32:19 +00:00
|
|
|
</text>
|
|
|
|
</group>
|
2018-09-02 19:58:05 +00:00
|
|
|
|
2016-02-10 21:32:19 +00:00
|
|
|
<hrule/>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<default-padding>6</default-padding>
|
|
|
|
<empty><stretch>true</stretch></empty>
|
|
|
|
<button>
|
|
|
|
<legend>Close</legend>
|
|
|
|
<equal>true</equal>
|
|
|
|
<key>Esc</key>
|
|
|
|
<default>true</default>
|
2018-05-17 11:58:44 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
setprop("sim/model/open-pfuel-cap", 0);
|
|
|
|
</script>
|
|
|
|
</binding>
|
2016-02-10 21:32:19 +00:00
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
</PropertyList>
|