fbf4be91e3
from https://github.com/c172p-team/c172p/releases/tag/version%2F2020.4 f0e108bca8ebfde42c8496df84dd580716242a0d
294 lines
12 KiB
XML
294 lines
12 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<PropertyList>
|
|
|
|
<name>c172p-fuel-both-tanks-dialog</name>
|
|
<layout>vbox</layout>
|
|
<resizable>false</resizable>
|
|
<modal>false</modal>
|
|
<draggable>true</draggable>
|
|
|
|
<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/right/level-norm", getprop("/consumables/fuel/tank[3]/level-norm"));
|
|
setprop("/consumables/fuel/left/level-gal_us", getprop("/consumables/fuel/tank[2]/level-gal_us"));
|
|
setprop("/consumables/fuel/right/level-gal_us", getprop("/consumables/fuel/tank[3]/level-gal_us"));
|
|
setprop("/consumables/fuel/left/level-lbs", getprop("/consumables/fuel/tank[2]/level-lbs"));
|
|
setprop("/consumables/fuel/right/level-lbs", getprop("/consumables/fuel/tank[3]/level-lbs"));
|
|
setprop("/consumables/fuel/left/level-litres", getprop("/consumables/fuel/tank[2]/level-litres"));
|
|
setprop("/consumables/fuel/right/level-litres", getprop("/consumables/fuel/tank[3]/level-litres"));
|
|
} else {
|
|
setprop("/consumables/fuel/left/level-norm", getprop("/consumables/fuel/tank[0]/level-norm"));
|
|
setprop("/consumables/fuel/right/level-norm", getprop("/consumables/fuel/tank[1]/level-norm"));
|
|
setprop("/consumables/fuel/left/level-gal_us", getprop("/consumables/fuel/tank[0]/level-gal_us"));
|
|
setprop("/consumables/fuel/right/level-gal_us", getprop("/consumables/fuel/tank[1]/level-gal_us"));
|
|
setprop("/consumables/fuel/left/level-lbs", getprop("/consumables/fuel/tank[0]/level-lbs"));
|
|
setprop("/consumables/fuel/right/level-lbs", getprop("/consumables/fuel/tank[1]/level-lbs"));
|
|
setprop("/consumables/fuel/left/level-litres", getprop("/consumables/fuel/tank[0]/level-litres"));
|
|
setprop("/consumables/fuel/right/level-litres", getprop("/consumables/fuel/tank[1]/level-litres"));
|
|
}
|
|
</open>
|
|
</nasal>
|
|
|
|
<group>
|
|
<layout>hbox</layout>
|
|
|
|
<empty><stretch>true</stretch></empty>
|
|
<text>
|
|
<label>Fuel Tanks</label>
|
|
</text>
|
|
<empty><stretch>true</stretch></empty>
|
|
|
|
<button>
|
|
<legend/>
|
|
<key>Esc</key>
|
|
<pref-width>16</pref-width>
|
|
<pref-height>16</pref-height>
|
|
<binding>
|
|
<command>dialog-close</command>
|
|
</binding>
|
|
</button>
|
|
</group>
|
|
|
|
<hrule/>
|
|
|
|
<group>
|
|
<layout>hbox</layout>
|
|
<padding>6</padding>
|
|
|
|
<group>
|
|
<layout>vbox</layout>
|
|
<text>
|
|
<label>Tank</label>
|
|
<halign>center</halign>
|
|
</text>
|
|
<text>
|
|
<label>Left Tank:</label>
|
|
<halign>left</halign>
|
|
</text>
|
|
<text>
|
|
<label>Right Tank:</label>
|
|
<halign>left</halign>
|
|
</text>
|
|
<text>
|
|
<label></label>
|
|
</text>
|
|
</group>
|
|
|
|
<group>
|
|
<layout>vbox</layout>
|
|
<text>
|
|
<label></label>
|
|
<halign>left</halign>
|
|
</text>
|
|
<slider>
|
|
<name>c172p-left-fuel-slider2</name>
|
|
<min>0</min>
|
|
<max>1</max>
|
|
<live>true</live>
|
|
<enable>
|
|
<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>
|
|
</enable>
|
|
<property>/consumables/fuel/left/level-norm</property>
|
|
<binding>
|
|
<command>dialog-apply</command>
|
|
</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"));
|
|
} 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"));
|
|
}
|
|
</script>
|
|
</binding>
|
|
</slider>
|
|
<slider>
|
|
<name>c172p-right-fuel-slider2</name>
|
|
<min>0</min>
|
|
<max>1</max>
|
|
<live>true</live>
|
|
<enable>
|
|
<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>
|
|
</enable>
|
|
<property>/consumables/fuel/right/level-norm</property>
|
|
<binding>
|
|
<command>dialog-apply</command>
|
|
</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[3]/level-norm", getprop("/consumables/fuel/right/level-norm"));
|
|
setprop("/consumables/fuel/right/level-gal_us", getprop("/consumables/fuel/tank[3]/level-gal_us"));
|
|
setprop("/consumables/fuel/right/level-lbs", getprop("/consumables/fuel/tank[3]/level-lbs"));
|
|
} else {
|
|
setprop("/consumables/fuel/tank[1]/level-norm", getprop("/consumables/fuel/right/level-norm"));
|
|
setprop("/consumables/fuel/right/level-gal_us", getprop("/consumables/fuel/tank[1]/level-gal_us"));
|
|
setprop("/consumables/fuel/right/level-lbs", getprop("/consumables/fuel/tank[1]/level-lbs"));
|
|
}
|
|
</script>
|
|
</binding>
|
|
</slider>
|
|
<text>
|
|
<label>Total: </label>
|
|
<halign>right</halign>
|
|
</text>
|
|
</group>
|
|
|
|
<group>
|
|
<layout>vbox</layout>
|
|
<text>
|
|
<label>Pounds</label>
|
|
<halign>left</halign>
|
|
</text>
|
|
<text>
|
|
<label>12345</label>
|
|
<halign>left</halign>
|
|
<format>%.1f</format>
|
|
<live>true</live>
|
|
<property>/consumables/fuel/left/level-lbs</property>
|
|
</text>
|
|
<text>
|
|
<label>12345</label>
|
|
<halign>left</halign>
|
|
<format>%.1f</format>
|
|
<live>true</live>
|
|
<property>/consumables/fuel/right/level-lbs</property>
|
|
</text>
|
|
<text>
|
|
<label>12345</label>
|
|
<halign>left</halign>
|
|
<format>%.1f</format>
|
|
<live>true</live>
|
|
<property>/consumables/fuel/total-fuel-lbs</property>
|
|
</text>
|
|
</group>
|
|
|
|
<group>
|
|
<layout>vbox</layout>
|
|
<text>
|
|
<label>Gallons</label>
|
|
<halign>left</halign>
|
|
</text>
|
|
<text>
|
|
<label>12345</label>
|
|
<halign>left</halign>
|
|
<format>%.2f</format>
|
|
<live>true</live>
|
|
<property>/consumables/fuel/left/level-gal_us</property>
|
|
</text>
|
|
<text>
|
|
<label>12345</label>
|
|
<halign>left</halign>
|
|
<format>%.2f</format>
|
|
<live>true</live>
|
|
<property>/consumables/fuel/right/level-gal_us</property>
|
|
</text>
|
|
<text>
|
|
<label>12345</label>
|
|
<halign>left</halign>
|
|
<format>%.2f</format>
|
|
<live>true</live>
|
|
<property>/consumables/fuel/total-fuel-gal_us</property>
|
|
</text>
|
|
</group>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
<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>Sliders disabled while engine is running!</label>
|
|
</text>
|
|
<text>
|
|
<row>0</row>
|
|
<col>0</col>
|
|
<visible>
|
|
<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>
|
|
</visible>
|
|
<color>
|
|
<red>0.9</red>
|
|
<green>0.1</green>
|
|
<blue>0.1</blue>
|
|
</color>
|
|
<label>Sliders disabled while in the air!</label>
|
|
</text>
|
|
</group>
|
|
|
|
<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>
|
|
<binding>
|
|
<command>dialog-close</command>
|
|
</binding>
|
|
</button>
|
|
</group>
|
|
|
|
</PropertyList>
|