• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FS2004 EFDAS Test Mode

Messages
1,468
Country
italy
Could someone have a look at this code and suggest what may be wrong.
With ground power on, the EFDAS fail lights are illuminated (correct). The test switch extinguishes them (correct). The switch is returned to it's original position the fail lights come on again (correct). Originally I used (A:GENERAL ENG1 GENERATOR ACTIVE,bool) 0 to extinguish the lights and it worked when it was in isolation. But now when the generator starts the lights stay on(incorrect). Your suggestions much appreciated.
vololiberista

Code:
<Gauge Name="EFDAS fail light" Version="1.0">
   <Element>
      <Select>
         <Value> (L:efdas test,number) 1 == if{ 2 (A:GENERAL ENG1 GENERATOR ACTIVE,bool) 0 } els{ (A:GENERAL ENG1 GENERATOR ACTIVE,bool) 1 }</Value>
	     <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="0"/>
         </Failures>
         <Case Value="0">
            <Image Name="RED_OFF.bmp" Luminous="0" ImageSizes="12,12"/>
         </Case>
		 <Case Value="1">
            <Image Name="EFDAS1_ON.bmp" Bright="Yes" ImageSizes="12,12"/>
         </Case>
      </Select>
   </Element>
   <Mouse>
      <Tooltip>EFDAS fail light</Tooltip>
   </Mouse>
</Gauge>
 
All that is happening is that the last value in each option is the only one being used.
Code:
<Value> (L:efdas test,number) 1 == 
   if{ 2 (A:GENERAL ENG1 GENERATOR ACTIVE,bool)[COLOR="Red"] 0[/COLOR] } 
   els{ (A:GENERAL ENG1 GENERATOR ACTIVE,bool) [COLOR="Red"]1[/COLOR] }
</Value>

Try
Code:
<Value> (L:efdas test,number) 1 == 
	if{ (A:GENERAL ENG1 GENERATOR ACTIVE,bool) 0 != 
              if{ 0 } 
              els{ 1 } 
          }
</Value>

Ted.
 
Last edited:
Thanks for that. however I get the same result as before. The test switch turns off the lights but the active engine generator does not :-((

It's possible that I haven't created enough if / els statements
The conditions are:-
L:var 0 / Eng Gen 0 = lights on

L:var 1 / Eng Gen 0 = lights off

L:var 0 / Eng Gen 1 = lights off

L:var 1 / Eng Gen 1 = lights off

In effect I'm trying to create a gauge that is driven by the engine generator being on/off plus a test switch that overrides the fail light on situation
vololiberista
 
Last edited:
Try

Code:
<Value>
(L:efdas test,number) 1 == ! (A:GENERAL ENG1 GENERATOR ACTIVE,bool) 0 == &amp;&amp; !
</Value>

Or since the lamp is off all the time the Generator is on just test the switch when the generator is off.

Code:
<Value>
 (A:GENERAL ENG1 GENERATOR ACTIVE,bool) 0 != 
       if{ 1 }
       els{ (L:efdas test,number) 1 == 
               if{ 0 }
           }
</Value>
 
Last edited:
Try

Code:
<Value>
(L:efdas test,number) 1 == ! (A:GENERAL ENG1 GENERATOR ACTIVE,bool) 0 == &amp;&amp; !
</Value>

Or since the lamp is off all the time the Generator is on just test the switch when the generator is off.

Code:
<Value>
 (A:GENERAL ENG1 GENERATOR ACTIVE,bool) 0 != 
       if{ 1 }
       els{ (L:efdas test,number) 1 == 
               if{ 0 }
           }
</Value>

Thanks Ted,
Your first solution here works!! The second solution seemed to ignore the L:var. In other words the switch had no effect even though the L:var value was recognised! Also the light were on in a cold cockpit!

Now? perhaps I should link the gauge to FS recorder?????!!!!!!! Seems logical :-)
Thanks again for your help. I do have one further question if I may? Regarding the <click> function. Ideally I would like (from the mouse point of view) a click hold and release action. Can that be done in the xml code?
vololiberista
vololiberista
 
Last edited:
This works on my Brigand.

Code:
<Gauge Name=" test button." Version="1.2" Author="Edward Cook">
<!-- e-mail : tedcook@btinternet.com : This gauge is freeware.  -->
<!-- Image Sizes: base=64,64; buttons=25,25. -->

    <Image Name="ButtBase.bmp" />

    <Element>
        <Position X="20" Y="20" />
        <Select>
            <Value>(L:HTButton,bool)</Value>
            <Case Value="0">
                <Image Name="ButtOut.bmp" />
            </Case>
            <Case Value="1">
                <Image Name="ButtIn.bmp" />
            </Case>  
        </Select>
    </Element>

    <Mouse>
        <Tooltip>Test Button.</Tooltip>
        <Cursor Type="Hand" />
        <Click Kind="LeftSingle+LeftRelease">
            (M:Event) 'LeftSingle' scmp 0 == if{ 1 (>L:HTButton,bool) }
            (M:Event) 'LeftRelease' scmp 0 == if{ 0 (>L:HTButton,bool) }
        </Click>
    </Mouse>

</Gauge>

Ted.
 
Back
Top