Hi phjvh,Thanks for your response, tried your code, the needle goes to zero and stays there.This is an image if the real fuel contents indicatorThe idea is that the needles normally show the front (LF Fuel Group) and rear (R Fuel Group)When you press the test button the needles and counter go to zero, when you release the button the needles go back to the normal state.When you press the WING, CFUS (Both needles come together to act as one needle), UFUS or UWING buttons the needles show the tank contents, the counter remains at total remaining fuel, when you release the button the needles go back to the normal state. This is the current state using your code This is the whole code for the gauge
<Gauge Name="Fuel Quantity Indicator / Selector Unit" Version="1.0"> <Image Name="Fuel_Total.bmp" Luminous="1" ImageSizes="256,256"/>//-------------------- Total Fuel 1 Digit <Element> <Position X="0" Y="0"/> <MaskImage Name="FT_Mask.bmp" ImageSizes="256,256"> <Axis X="152" Y="136"/> </MaskImage> <Image Name="FT_strip.bmp" ImageSizes="34,375"> <Axis X="0" Y="0"/> </Image> <Shift> <Value>(L:FUEL TANK TOTAL1 QUANTITY,Gallons) if{ 1 (>L:FUEL TANK TOTAL1 QUANTITY,Gallons) 0 3.8 * 0.8 * } els{ 0 (A:FUEL TANK CENTER QUANTITY,Gallons) (A:FUEL TANK CENTER2 QUANTITY,Gallons) + (A:FUEL TANK CENTER3 QUANTITY,Gallons) + (A:FUEL TANK LEFT AUX QUANTITY,Gallons) + (A:FUEL TANK RIGHT AUX QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL1 QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL2 QUANTITY,Gallons) + if{ (>L:FUEL TANK TOTAL1 QUANTITY,Gallons) (A:FUEL TANK CENTER QUANTITY,Gallons) (A:FUEL TANK CENTER2 QUANTITY,Gallons) + (A:FUEL TANK CENTER3 QUANTITY,Gallons) + (A:FUEL TANK LEFT AUX QUANTITY,Gallons) + (A:FUEL TANK RIGHT AUX QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL1 QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL2 QUANTITY,Gallons) + 3.8 * 0.8 * 1 / 10 % flr } </Value> <Nonlinearity> <Item Value="0" X="0" Y="34"/> <Item Value="10" X="0" Y="-307"/> </Nonlinearity> <Delay PixelsPerSecond="200"/> </Shift> </Element>//-------------------- Total Fuel 10 Digit <Element> <Position X="0" Y="0"/> <MaskImage Name="FT_Mask.bmp" ImageSizes="256,256"> <Axis X="126" Y="136"/> </MaskImage> <Image Name="FT_strip.bmp" ImageSizes="34,375"> <Axis X="0" Y="0"/> </Image> <Shift> <Value>(L:FUEL TANK TOTAL10 QUANTITY,Gallons) if{ 1 (>L:FUEL TANK TOTAL10 QUANTITY,Gallons) 0 3.8 * 0.8 * } els{ 0 (A:FUEL TANK CENTER QUANTITY,Gallons) (A:FUEL TANK CENTER2 QUANTITY,Gallons) + (A:FUEL TANK CENTER3 QUANTITY,Gallons) + (A:FUEL TANK LEFT AUX QUANTITY,Gallons) + (A:FUEL TANK RIGHT AUX QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL1 QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL2 QUANTITY,Gallons) + if{ (>L:FUEL TANK TOTAL1 QUANTITY,Gallons) (A:FUEL TANK CENTER QUANTITY,Gallons) (A:FUEL TANK CENTER2 QUANTITY,Gallons) + (A:FUEL TANK CENTER3 QUANTITY,Gallons) + (A:FUEL TANK LEFT AUX QUANTITY,Gallons) + (A:FUEL TANK RIGHT AUX QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL1 QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL2 QUANTITY,Gallons) + 3.8 * 0.8 * 10 / 10 % flr } </Value> <Nonlinearity> <Item Value="0" X="0" Y="34"/> <Item Value="10" X="0" Y="-307"/> </Nonlinearity> <Delay PixelsPerSecond="120"/> </Shift> </Element> //-------------------- Total Fuel 100 Digit <Element> <Position X="0" Y="0"/> <MaskImage Name="FT_Mask.bmp" ImageSizes="256,256"> <Axis X="100" Y="136"/> </MaskImage> <Image Name="FT_strip.bmp" ImageSizes="34,375"> <Axis X="0" Y="0"/> </Image> <Shift> <Value>(L:FUEL TANK TOTAL100 QUANTITY,Gallons) if{ 1 (>L:FUEL TANK TOTAL100 QUANTITY,Gallons) 0 3.8 * 0.8 * } els{ 0 (A:FUEL TANK CENTER QUANTITY,Gallons) (A:FUEL TANK CENTER2 QUANTITY,Gallons) + (A:FUEL TANK CENTER3 QUANTITY,Gallons) + (A:FUEL TANK LEFT AUX QUANTITY,Gallons) + (A:FUEL TANK RIGHT AUX QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL1 QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL2 QUANTITY,Gallons) + if{ (>L:FUEL TANK TOTAL1 QUANTITY,Gallons) (A:FUEL TANK CENTER QUANTITY,Gallons) (A:FUEL TANK CENTER2 QUANTITY,Gallons) + (A:FUEL TANK CENTER3 QUANTITY,Gallons) + (A:FUEL TANK LEFT AUX QUANTITY,Gallons) + (A:FUEL TANK RIGHT AUX QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL1 QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL2 QUANTITY,Gallons) + 3.8 * 0.8 * 100 / 10 % flr } </Value> <Nonlinearity> <Item Value="0" X="0" Y="34"/> <Item Value="10" X="0" Y="-307"/> </Nonlinearity> <Delay PixelsPerSecond="120"/> </Shift> </Element>//-------------------- Total Fuel 1000 Digit <Element> <Position X="0" Y="0"/> <MaskImage Name="FT_Mask.bmp" ImageSizes="256,256"> <Axis X="74" Y="136"/> </MaskImage> <Image Name="FT_strip.bmp" ImageSizes="34,375"> <Axis X="0" Y="0"/> </Image> <Shift> <Value>(L:FUEL TANK TOTAL1 QUANTITY,Gallons) if{ 1 (>L:FUEL TANK TOTAL1000 QUANTITY,Gallons) 0 3.8 * 0.8 * } els{ 0 (A:FUEL TANK CENTER QUANTITY,Gallons) (A:FUEL TANK CENTER2 QUANTITY,Gallons) + (A:FUEL TANK CENTER3 QUANTITY,Gallons) + (A:FUEL TANK LEFT AUX QUANTITY,Gallons) + (A:FUEL TANK RIGHT AUX QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL1 QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL2 QUANTITY,Gallons) + if{ (>L:FUEL TANK TOTAL1 QUANTITY,Gallons) (A:FUEL TANK CENTER QUANTITY,Gallons) (A:FUEL TANK CENTER2 QUANTITY,Gallons) + (A:FUEL TANK CENTER3 QUANTITY,Gallons) + (A:FUEL TANK LEFT AUX QUANTITY,Gallons) + (A:FUEL TANK RIGHT AUX QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL1 QUANTITY,Gallons) + (A:FUEL TANK EXTERNAL2 QUANTITY,Gallons) + 3.8 * 0.8 * 1000 / 10 % flr } </Value> <Nonlinearity> <Item Value="0" X="0" Y="34"/> <Item Value="10" X="0" Y="-307"/> </Nonlinearity> <Delay PixelsPerSecond="120"/> </Shift> </Element> //------------------------Rear / Right Fuel Quantity Needle <Element> <Position X="128" Y="128"/> <Image Name="FT_R_Needle.bmp" Luminous="1" PointsTo="East" ImageSizes="117,36"> <Axis X="18" Y="18"/> </Image> <Rotate> <Value>(L:FUEL TANK REAR QUANTITY,Gallons) if{ 1 (>L:FUEL TANK REAR QUANTITY,Gallons) 0 3.8 * 0.8 * } els{ 0 (A:FUEL TANK CENTER3 QUANTITY,Gallons) if{ (>L:FUEL TANK REAR QUANTITY,Gallons) (A:FUEL TANK CENTER3 QUANTITY,Gallons) 3.8 * 0.8 * } } </Value> <Failures> <SYSTEM_ELECTRICAL_PANELS Action="0"/> <GAUGE_FUEL_INDICATORS Action="Freeze"/> </Failures> <Nonlinearity> <Item Value="0" X="31" Y="157"/> <Item Value="500" X="38" Y="83"/> <Item Value="1000" X="97" Y="32"/> <Item Value="1500" X="174" Y="38"/> <Item Value="2000" X="224" Y="96"/> <Item Value="2500" X="224" Y="157"/> </Nonlinearity> <Delay DegreesPerSecond="60"/> </Rotate> </Element>//------------------------Front / Left Fuel Quantity Needle <Element> <Position X="128" Y="128"/> <Image Name="FT_LF_Needle.bmp" Luminous="1" PointsTo="East" ImageSizes="117,36"> <Axis X="18" Y="18"/> </Image> <Rotate> <Value>(L:FUEL TANK FRONT QUANTITY,Gallons) if{ 1 (>L:FUEL TANK FRONT QUANTITY,Gallons) 0 3.8 * 0.8 * } els{ 0 (A:FUEL TANK CENTER QUANTITY,Gallons) (A:FUEL TANK CENTER2 QUANTITY,Gallons) + if{ (>L:FUEL TANK FRONT QUANTITY,Gallons) (A:FUEL TANK CENTER QUANTITY,Gallons) (A:FUEL TANK CENTER2 QUANTITY,Gallons) + 3.8 * 0.8 * } } </Value> <Failures> <SYSTEM_ELECTRICAL_PANELS Action="0"/> <GAUGE_FUEL_INDICATORS Action="Freeze"/> </Failures> <Nonlinearity> <Item Value="0" X="31" Y="157"/> <Item Value="500" X="38" Y="83"/> <Item Value="1000" X="97" Y="32"/> <Item Value="1500" X="174" Y="38"/> <Item Value="2000" X="224" Y="96"/> <Item Value="2500" X="224" Y="157"/> </Nonlinearity> <Delay DegreesPerSecond="60"/> </Rotate> </Element> <Mouse>//------------------------ Test Button <Area Left="0" Right="50" Top="0" Bottom="50"> <Cursor Type="Hand"/> <Click Kind="LeftSingle+LeftRelease"> (L:FUEL TANK FRONT QUANTITY,Gallons) ! (>L:FUEL TANK FRONT QUANTITY,Gallons) (L:FUEL TANK FRONT QUANTITY,Gallons) 0 == if{ 1 } els{ 0 } (L:FUEL TANK REAR QUANTITY,Gallons) ! (>L:FUEL TANK REAR QUANTITY,Gallons) (L:FUEL TANK REAR QUANTITY,Gallons) 0 == if{ 1 } els{ 0 } (L:FUEL TANK TOTAL1 QUANTITY,Gallons) ! (>L:FUEL TANK TOTAL1 QUANTITY,Gallons) (L:FUEL TANK TOTAL1 QUANTITY,Gallons) 0 == if{ 1 } els{ 0 } (L:FUEL TANK TOTAL10 QUANTITY,Gallons) ! (>L:FUEL TANK TOTAL10 QUANTITY,Gallons) (L:FUEL TANK TOTAL10 QUANTITY,Gallons) 0 == if{ 1 } els{ 0 } (L:FUEL TANK TOTAL100 QUANTITY,Gallons) ! (>L:FUEL TANK TOTAL100 QUANTITY,Gallons) (L:FUEL TANK TOTAL100 QUANTITY,Gallons) 0 == if{ 1 } els{ 0 } (L:FUEL TANK TOTAL1000 QUANTITY,Gallons) ! (>L:FUEL TANK TOTAL1000 QUANTITY,Gallons) (L:FUEL TANK TOTAL1000 QUANTITY,Gallons) 0 == if{ 1 } els{ 0 } </Click> </Area>//------------------------ Wing Tanks<Area Left="200" Right="250" Top="0" Bottom="50"> <Cursor Type="Hand"/> <Click Kind="LeftSingle+LeftRelease"> (L:FUEL TANK QUANTITY BUTTON,bool) ! (>L:FUEL TANK QUANTITY BUTTON,bool) (L:FUEL TANK QUANTITY BUTTON,bool) if{ (A:FUEL TANK LEFT AUX QUANTITY,Gallons) 3.04 * (>L:FUEL TANK FRONT QUANTITY,Gallons) } els{ (A:FUEL TANK CENTER QUANTITY,Gallons) (A:FUEL TANK CENTER2 QUANTITY,Gallons) + 3.04 * (>L:FUEL TANK FRONT QUANTITY,Gallons) } </Click> </Area> </Mouse></Gauge>
Sorry for no tab, happened when I added the code.my original mouse code sent the needle to zero but when you released it it returned to the normal position
<Area Left="200" Right="250" Top="0" Bottom="50"> <Cursor Type="Hand"/> <Click Kind="LeftSingle+LeftRelease"> (L:FUEL TANK FRONT QUANTITY,Gallons) ! (>L:FUEL TANK FRONT QUANTITY,Gallons) (L:FUEL TANK FRONT QUANTITY,Gallons) 1 == if{ 1 (A:FUEL TANK LEFT AUX QUANTITY,Gallons) if{ (>L:FUEL TANK FRONT QUANTITY,Gallons) (A:FUEL TANK LEFT AUX QUANTITY,Gallons) 3.8 * 0.8 * } } els{ 0 (A:FUEL TANK CENTER QUANTITY,Gallons) (A:FUEL TANK CENTER2 QUANTITY,Gallons) + if{ (>L:FUEL TANK FRONT QUANTITY,Gallons) (A:FUEL TANK CENTER QUANTITY,Gallons) (A:FUEL TANK CENTER2 QUANTITY,Gallons) + 3.8 * 0.8 * } } </Click> </Area>
I hope this info gives a better idea, your help would be most appreciated as I am trying to create an authentic Panavia Tornado GR1 panel with accurate systems and gauges, now that the air publications have been declassified.Thanking you in advanceGR4Jockey