• 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 3 way switch (again)

Messages
210
Country
us-michigan
I have taken Roman's code for the landing/taxi lights and adapted it for my own 2d Lear starter/Gen switches.

This is the same idea that has been covered in the past 3 way Learjet starter switches.
Center - off
Down - Starter
Up- Generator on

My adapted code works perfectly....except the switch does not visually go to the UPposition when clicked.
The Generators are coming on line so that part works fine.

Any help would be appreaciated...

Here's the whole gauge..

Code:
<Gauge Name="Lear starter1 " Version="1.0">
   <Element>
      <Select>
         <Value>(A:General eng1 generator switch,bool) if{ 50 } els{ (A:Circuit general panel on, bool) (A:Eng1 N2 RPM, percent) 50 &lt; &amp;&amp; if{ 0 (&gt;K:TOGGLE_STARTER1) } els{ (G:Var1) -- (&gt;G:Var1) } } (G:Var1) 0 != (A:General eng1 starter, bool) if{ 0 } els{ 25 } }</Value>
         <Case Value="25">
            <Image Name="Toggle_Switch_Lg_Cen.bmp" ImageSizes="34,44"/>
         </Case>
         <Case Value="50">
            <Image Name="Toggle_Switch_Lg_Up.bmp" ImageSizes="34,44"/>
         </Case>
         <Case Value="0">
            <Image Name="Toggle_Switch_Lg_Down.bmp" ImageSizes="34,44"/>
         </Case>
      </Select>
   </Element>
   <Mouse>
      <Area Left="0" Right="42" Top="0" Bottom="33">
      <Cursor Type="UpArrow" />
      <Click Event="TOGGLE_ALTERNATOR1"/>
    </Area>
      <Area Left="0" Right="42" Top="34" Bottom="67">
      <Cursor Type="DownArrow" />
      <Click>5 (&gt;G:Var1)</Click>
    </Area>

   </Mouse>
</Gauge>

Thank you

Greg
 
Simple things first. Are you sure your up bitmap is named exactly what you call it in the code?
 
Here you have an example that should work.
Code is verbosed so you can better understand the logic.

Code:
<Element>
  <Select>
    <Value>
      (L:Starter1,enum)  50 == (A:General eng1 generator switch,bool)  ! and
      (L:Starter1,enum)  25 == (A:General eng1 generator switch,bool)  and 
       or if{ (>K:TOGGLE_ALTERNATOR1) }
      (L:Starter1,enum)  25 == (A:General eng1 starter, bool) and    
       if{ (>K:TOGGLE_STARTER1) }
      (L:Starter1,enum)  0 == (A:General eng1 starter, bool)  ! and    
       if{ (>K:TOGGLE_STARTER1) }
       (L:Starter1,enum)
    </Value>
    <Case Value="25">
       <Image Name="Toggle_Switch_Lg_Cen.bmp" ImageSizes="34,44"/>
    </Case>
    <Case Value="50">
       <Image Name="Toggle_Switch_Lg_Up.bmp" ImageSizes="34,44"/>
    </Case>
    <Case Value="0">
       <Image Name="Toggle_Switch_Lg_Down.bmp" ImageSizes="34,44"/>
    </Case>
  </Select>
</Element>
<Mouse>
  <Area Left="0" Right="42" Top="0" Bottom="33">
    <Cursor Type="UpArrow" />
    <Click> (L:Starter1,enum) 25 + 50 min (>L:Starter1,enum)
  </Area>
  <Area Left="0" Right="42" Top="34" Bottom="67">
    <Cursor Type="DownArrow" />
    <Click>(L:Starter1,enum) 25 - 0 max (>L:Starter1,enum)</Click>
  </Area>
</Mouse>

The basic idea for flipping switches is that they must move no matter the general condition of the aircraft systems (with or without electrics on, or engine running,for example). In this particular example, generator or starter should go on as soon as the lear is electrically powered (which I guess is not quite real).

Tom
 
k...Not smart enough for sure in this area...

Thanks for the reply Tom. It kinda worked after I adjusted the click area, but not correctly. It was trying to fire the starters as soon as the plane loaded, which should not happen without the battery on at least. Still messing around with it though.

Ed, Are you referring to the numerical order in the first 'value' section or the the 'case value' section.?

Greg
 
Back
Top