- Messages
- 1,468
- Country

As mentioned in another thread I have an oxygen flow meter (a bar that rises and falls above 5000ft) see second code.
I also have a three way switch representing "mask test" / "normal" / "emergency"
I want the oxygen flow meter bar to also work in "test" and "emergency" (see first code)regardless of the height. I have fiddled with the switch code but can't get the L:var to work inside the flow meter gauge.
vololiberista
I also have a three way switch representing "mask test" / "normal" / "emergency"
I want the oxygen flow meter bar to also work in "test" and "emergency" (see first code)regardless of the height. I have fiddled with the switch code but can't get the L:var to work inside the flow meter gauge.
vololiberista
Code:
<Gauge Name="Oxygen Test Switch" Version="1.0">
<Element>
<Select>
<Value>(G:Var1)</Value>
<Case Value="1">
<Image Name="OX_TEST_UP.bmp" ImageSizes="24,36"/>
</Case>
<Case Value="0">
<Image Name="OX_TEST_MIDDLE.bmp" ImageSizes="24,36"/>
</Case>
<Case Value="2">
<Image Name="OX_TEST_DOWN.bmp" ImageSizes="24,36"/>
</Case>
</Select>
</Element>
<Mouse>
<Area Top="0" Bottom="35">
<Cursor Type="Hand"/>
<Click>1 (>G:Var1) 1 (>L:oxygen_test,number) 1 (>L:Sound_click,enum)</Click>
</Area>
<Area Top="36" Bottom="71">
<Cursor Type="Hand"/>
<Click>0 (>G:Var1) -1 (>L:oxygen_test,number) 1 (>L:Sound_click,enum) 0 (>L:Sound_click,enum)</Click>
</Area>
<Area Top="72" Bottom="110">
<Cursor Type="Hand"/>
<Click>2 (>G:Var1) 1 (>L:oxygen_test,number) 1 (>L:Sound_click,enum)</Click>
</Area>
</Mouse>
</Gauge>
Code:
<Gauge Name="Oxygen Flow Indicator" Version="1.0">
<Image Name="oxy_flow_indicator_bg3.bmp"/>
<Element>
<Position X="15" Y="43"/>
<Image Name="oxy_flow_indicator3.bmp"/>
<Shift>
<Value>
(L:oxygen_test,number) 1 == if{ 2 } els{ (A:Fuel total quantity,gallons) 0 > if{ (A:Indicated Altitude,feet) 5000 > if{ (P:Local time,seconds) 2 % } }
</Value>
<Nonlinearity>
<Item Value="0" X="11" Y="63"/>
<Item Value="1" X="11" Y="45"/>
<Item Value="2" X="11" Y="63"/>
</Nonlinearity>
</Shift>
</Element>
<Element>
<Position X="0" Y="58"/>
<Image Name="oxy_flow_indicator_cover3.bmp"/>
</Element>
<Mouse>
<Tooltip ID="">Oxygen Flow Indicator</Tooltip>
</Mouse>
</Gauge>


