• 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.

'Flaps Down' Warning 'not' Warning.

Messages
10,158
Country
us-arizona
Hey guys,

I think I am missing a condition here. I have a font warning in a guage Element I am trying to get to come on.

The font says 'Flaps Up' in green when the flaps are up. When Flaps are lowered/retracted, then the Flaps Down warning should come up in red font. However it doesnt.

I have tried some variations on the 'Flaps Down' code, trying to trigger it. Nothing seems to work.

Here is the code so far. Flaps UP works fine. I need to say to the system 'when flaps are 1% or more down, that switch is on for Flaps Down Text.




Code:
      <Element Name="FLAPS DOWN MESSAGE">
            <Position X="65" Y="100"/>
            <Text X="135" Y="20" Bright="Yes" Length="120" Font="Arial Bold" FontSize="18" Color="Red" Adjust="Left" VerticalAdjust="Bottom" Multiline="No">
               <String>%((A:FLAPS HANDLE PERCENT ,percent)  near 1+ ==)%{if}FLAPS DOWN%{end}%</String>
            </Text>
   </Element>

      <Element Name="FLAPS UP MESSAGE">
            <Position X="65" Y="100"/>
            <Text X="135" Y="20" Bright="Yes" Length="120" Font="Arial Bold" FontSize="18" Color="Green" Adjust="Left" VerticalAdjust="Bottom" Multiline="No">
               <String>%((A:FLAPS HANDLE PERCENT,percent)  near 0 ==)%{if}FLAPS UP%{end}%</String>
            </Text>
   </Element>



Thanks for any ideas or input on this,


Bill
LHC
 
Bill,

Is there suppose to be a % after end}

Also why the 1+ - don't think it makes a difference or did you forget some value?

Your code translates to.

( near( (A:FLAPS HANDLE PERCENT , percent) ) == 1+ )
 
Last edited:
Hey Ron,

I dont see the negative in there, only the 1+ with two equals.

What I need is to declare a zone from 1% to 100%, where zero is 'Flaps UP', and 1% through to 100% would be Flaps Down.

Bill
 
Bill, this will work (for RED light):

<String>%(1 100 (A:FLAPS HANDLE PERCENT ,percent) near rng)%{if}FLAPS DOWN%{end}</String>

rng is an operator to test whether a value fails within two bound values, placing a 1 on the stack if so and 0 otherwise.

syntax:

n1 n2 value/variable rng

Tom
 
Many thanks Tom.

I am just going to sit here and memorize how this works.. Its a wonder to me, really fascinating how the code works. Sometimes its very easy, and sometimes its terribly complex, (like Endurance calculation factors). Adding the 1 thru 100 at the front would have had me think that it would have shown up as font in the gauge, but I guess its 'in' the brackets, making it subject to the Value/Variable equasion process.

By the way, it didnt work at first, but I spotted a space between the Comma and the Value, and closing the gap repaired it. Works brilliant....!

Thanks for your help and explanation on how that works.


Bill
 
Just for the sake of completeness, here is the code I tested and sent to Bill via email.

Sometimes the simplest solution is hard to see... ;)

Code:
<Element Name="FLAPS DOWN MESSAGE">
   <Position X="65" Y="100"/>
   <Text X="135" Y="20" Bright="Yes" Length="120" Font="Arial Bold" FontSize="18" Color="Red" Adjust="Left" VerticalAdjust="Bottom" Multiline="No">
      <String>%((A:FLAPS HANDLE PERCENT,percent) 1 &gt;)%{if}FLAPS DOWN%{end}%</String>
   </Text>
</Element>

<Element Name="FLAPS UP MESSAGE">
   <Position X="65" Y="100"/>
   <Text X="135" Y="20" Bright="Yes" Length="120" Font="Arial Bold" FontSize="18" Color="Green" Adjust="Left" VerticalAdjust="Bottom" Multiline="No">
     <String>%((A:FLAPS HANDLE PERCENT,percent) 0 ==)%{if}FLAPS UP%{end}%</String>
   </Text>
</Element>
 
Back
Top