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

BT-13 Flaps

Messages
1,084
Country
us-northcarolina
Please check below I have this xml gauge on the panel; the mouse hand appears as it should above and below the lever, but the handle does not rotate visibly nor does the flaps indicator increase or decrease with clicks. Here is the code:

Code:
<Gauge Name="Flap Handle" Version="1.0">
<Image Name="Flap Background.bmp"/>
<Element>
     <Position X="195" Y="195"/>
     <Image Name= "Flap Handle.bmp">
     <Axis X="230" Y="35"/>
     </Image>
     <Rotate>
     <Value>(G:Var1) 4 / 6.28318*</Value>
      </Rotate>
</Element>
<Mouse>
<Area Left="0" Top="0" Width="100" height="50">
<Tooltip ID="TOOLTIPTEXT_FLAP_LEVER_INCREASE"/>
<Cursor Type="Hand"/>
<Click>"FLAPS_INCR"</Click>
</Area>
<Area Left="100" Top="0" Width="100" Height="50">
<Tooltip ID="TOOLTIPTEXT_FLAP_LEVER_DECREASE"/>
<Cursor Type="Hand"/>
<Click>"FLAPS_DECR"</Click>
</Area>
</Mouse>
</Gauge>
 
Last edited:
Where in the code do you set the value for G:Var1? I don't see it. It should be in the Mouse section.

A smoother way to show the handle movement would be to make a separate image for the handle and use a Rotate command. Combined with a Lag command it would move more slowly from position to position.

And the place you set 0-20-40 degrees is in the Flaps section of the aircraft.cfg file, not in the gauge.
 
Thank you Tom I am trying to rotate it. Above in the first post I have edited. Need help. Tom says he has never done a gauge like this. Anybody know what my problem is please help, thanks.
 
Last edited:
Ok,

I did just for fun some coding and maybe it can help you out.
When clicking the flaps, a bitmap rotates 360 degrees.
Right increases flapposition and give a clockwide rotation.
Left vv.
This is the code for the clickspot:

Code:
<Click Kind="LeftSingle+RightSingle+Leave">
(M:Event) 'LeftSingle' scmp 0 ==
if{
(>K:FLAPS_DECR)
(A:TRAILING EDGE FLAPS LEFT PERCENT,PERCENT) 0 &gt;
if{ -1 (>L:Flaps handle test,enum) }
}
(M:Event) 'RightSingle' scmp 0 ==
if{
(>K:FLAPS_INCR)
(A:TRAILING EDGE FLAPS LEFT PERCENT,PERCENT) 100 &lt;
if{ 1 (>L:Flaps handle test,enum) }
}
</Click>

and this for the bitmap:
Code:
<Element>
<Position X="50" Y="480"/>
<Image Name="flap test.bmp"><Axis X="22.5" Y="22.5"/></Image>
<Rotate>
<Value>
(L:Flaps handle test,number) 1 ==
if{
(L:Flaps handle index,number) 0.1 + 6.3 min (>L:Flaps handle index,number)
(L:Flaps handle index,number) 6.3 ==
if{ 0 (>L:Flaps handle test,number) 0 (>L:Flaps handle index,number) }
}
els{
(L:Flaps handle test,number) -1 ==
if{
(L:Flaps handle index,number) 0.1 - -6.3 max (>L:Flaps handle index,number)
(L:Flaps handle index,number) -6.3 ==
if{ 0 (>L:Flaps handle test,number) 0 (>L:Flaps handle index,number) }
}
}
(L:Flaps handle index,number)
</Value>
<Delay degreesPerSecond="10"/>
</Rotate>
</Element>

Hope you can do something with it.
 
Below is what i just coded with your code, thank you for taking the time to do this for me. See if I made a mistake somewhere when I rewrote it because it does not appear in the aircraft so something is wrong that I did if yours above worked in the test bed.

Code:
<Gauge Name="Flap Handle" Version="1.0">
<Image Name="Flap Background.bmp"/>
<Element>
<Position X="195" Y="195"/>
<Image Name="Flap Handle.bmp"><Axis X="230" Y="35"/></Image>
<Rotate>
<Value>
(L:Flap Handle,number) 1 ==
if{
(L:Flap Handle index,number) 0.1 + 6.3 min (>L:Flap Handle index,number)
(L:Flap Handle index,number) 6.3 ==
if{ 0 (>L:Flap Handle,number) 0 (>L:Flap Handle index,number) }
}
els{
(L:Flap Handle,number) -1 ==
if{
(L:Flap Handle index,number) 0.1 - -6.3 max (>L:Flap Handle index,number)
(L:Flap Handle index,number) -6.3 ==
if{ 0 (>L:Flap Handle,number) 0 (>L:Flap Handle index,number) }
}
}
(L:Flap Handle index,number)
</Value>
<Delay degreesPerSecond="10"/>
</Rotate>
</Element>
Click Kind="LeftSingle+RightSingle+Leave">
(M:Event) 'LeftSingle' scmp 0 ==
if{
(>K:FLAPS_DECR)
(A:TRAILING EDGE FLAPS LEFT PERCENT,PERCENT) 0 &gt;
if{ -1 (>L:Flap Handle,enum) }
}
(M:Event) 'RightSingle' scmp 0 ==
if{
(>K:FLAPS_INCR)
(A:TRAILING EDGE FLAPS LEFT PERCENT,PERCENT) 100 &lt;
if{ 1 (>L:Flap Handle,enum) }
}
</Click>
</Gauge
 
You need a mouse and area section for the clicks!
something like (Coordinates unknown for me):

Code:
<Gauge>

<Element>
....what you want....
</Element>

<Mouse>

<Area Left="" Top="" Width="" Height="">
...click etc....
</Area>

</Mouse>

</Gauge>
 
Last edited:
Jan,
Here is code that is working for the flaps.


Code:
<Gauge Name="Flap Handle" Version="1.0">
<Image Name="Flap Background.bmp"/>
<Element>
<Position X="195" Y="195"/>
<Image Name="Flap Handle.bmp">
<Axis X="230" Y="35"/>
</Image>
<Rotate>
<Value>
(L:Flap Handle,number) 1 ==
if{
(L:Flap Handle index,number) 0.1 + 6.3 min (>L:Flap Handle index,number)
(L:Flap Handle index,number) 6.3 ==
if{ 0 (>L:Flap Handle,number) 0 (>L:Flap Handle index,number) }
}
els{
(L:Flap Handle,number) -1 ==
if{
(L:Flap Handle index,number) 0.1 - -6.3 max (>L:Flap Handle index,number)
(L:Flap Handle index,number) -6.3 ==
if{ 0 (>L:Flap Handle,number) 0 (>L:Flap Handle index,number) }
}
}
(L:Flap Handle index,number)
</Value>
<Delay degreesPerSecond="10"/>
</Rotate>
</Element>
<Mouse>
      <Area Left="0" Right="126" Top="0" Bottom="63">
         <Cursor Type="UpArrow"/>
         <Click Event="FLAPS_DECR" Repeat="Yes"/>

      </Area>
      <Area Left="0" Right="126" Top="63" Bottom="126">
         <Cursor Type="DownArrow"/>
         <Click Event="FLAPS_INCR" Repeat="Yes"/>
      </Area>
   </Mouse>
</Gauge>

This is the working code I have installed now. It activates the flaps perfectly but the handle does not rotate it just stays stationary. If this is all I can make work I can live with it but I would like that handle to rotate 360 degrees clockwise or counter clockwise when the + or - click occurs. Can that happen? I was hoping that was what your code did. Thank you for all your help. Is that possible to do with the code you gave me at the top?
 
You miss the code for the click i wrote; very important.
See upstairs or copy this:


Code:
<Area Left="0" Top="0" Width="126" Height="126">
<Help ID="HELPID_GAUGE_FLAP_LEVER_SOLO"/>
<Tooltip ID="TOOLTIPTEXT_FLAP_LEVER_DEGREES"/>
<Cursor Type="Hand"/>
<Click Kind="LeftSingle+RightSingle" Repeat="Yes">
(M:Event) 'LeftSingle' scmp 0 ==
if{
(>K:FLAPS_DECR)
(A:TRAILING EDGE FLAPS LEFT PERCENT,PERCENT) 0 &gt;
if{ -1 (>L:Flaps handle test,enum) }
}
(M:Event) 'RightSingle' scmp 0 ==
if{
(>K:FLAPS_INCR)
(A:TRAILING EDGE FLAPS LEFT PERCENT,PERCENT) 100 &lt;
if{ 1 (>L:Flaps handle test,enum) }
}
</Click>
</Area>

Left click is decrease, right is increase.
 
Hello Jan,
Thank you for working with me. I have copied the code above and pasted it into my gauge instead of the mouse clicks I had above and the gauge works perfectly with left and right mouse clicks with the exception that the handle is still not rotating but remaining stationary with no movement at all. Am I missing something? Here is the code I currently have for my gauge:

Code:
<Gauge Name="Flap Handle" Version="1.0">
<Image Name="Flap Background.bmp"/>
<Element>
<Position X="195" Y="195"/>
<Image Name="Flap Handle.bmp">
<Axis X="230" Y="35"/>
</Image>
<Rotate>
<Value>
(L:Flap Handle,number) 1 ==
if{
(L:Flap Handle index,number) 0.1 + 6.3 min (>L:Flap Handle index,number)
(L:Flap Handle index,number) 6.3 ==
if{ 0 (>L:Flap Handle,number) 0 (>L:Flap Handle index,number) }
}
els{
(L:Flap Handle,number) -1 ==
if{
(L:Flap Handle index,number) 0.1 - -6.3 max (>L:Flap Handle index,number)
(L:Flap Handle index,number) -6.3 ==
if{ 0 (>L:Flap Handle,number) 0 (>L:Flap Handle index,number) }
}
}
(L:Flap Handle index,number)
</Value>
<Delay degreesPerSecond="10"/>
</Rotate>
</Element>
<Mouse>
      <Area Left="0" Top="0" Width="126" Height="126">
<Help ID="HELPID_GAUGE_FLAP_LEVER_SOLO"/>
<Tooltip ID="TOOLTIPTEXT_FLAP_LEVER_DEGREES"/>
<Cursor Type="Hand"/>
<Click Kind="LeftSingle+RightSingle" Repeat="Yes">
(M:Event) 'LeftSingle' scmp 0 ==
if{
(>K:FLAPS_DECR)
(A:TRAILING EDGE FLAPS LEFT PERCENT,PERCENT) 0 &gt;
if{ -1 (>L:Flaps handle test,enum) }
}
(M:Event) 'RightSingle' scmp 0 ==
if{
(>K:FLAPS_INCR)
(A:TRAILING EDGE FLAPS LEFT PERCENT,PERCENT) 100 &lt;
if{ 1 (>L:Flaps handle test,enum) }
}
</Click>
</Area>
   </Mouse>
</Gauge>
 
Your mouse click increments/decrements (L:Flaps handle test, enum) however the Element that rotates Flap Handle.bmp works with a different L:Var, (L:Flap Handle, number). (L:Flap Handle, number) will be zero until a value is stored into it, but the mouse click does not store numbers into that variable. Your flap handle doesn't rotate because (L:Flap Handle, number) remains zero. With this explanation you should be able to figure out what to do.
 
Last edited:
Thank you for your help. Yes I found the mismatch errors; corrected them and the handle rotates perfectly in both directions as well as activating the gauge correctly. With that in mind, would you please take a look at the "Pitot Heat" thread and give me your opinion as to what is the problem. I am not cutting/pasting anything there. An existing gauge does not work on the panel no matter whose gauge or whether .xml or .gau file. Do you have any insight or ideas??? Again, thank you for all your help with all my gauges. They really make a great accurate panel from an almost good one.
 
HELP!!! My beautiful crank flaps that you helped me write and but so much work into quit extending. Didn't do anything I know of. After working on this for that past few hours, I am coming for help. Here is the xml code.

Code:
<Gauge Name="Flap Handle" Version="1.0">
<Image Name="Flap Background.bmp"/>
<Element>
<Position X="195" Y="195"/>
<Image Name="Flap Handle.bmp">
<Axis X="230" Y="35"/>
</Image>
<Rotate>
<Value>
(L:Flap Handle,number) 1 ==
if{
(L:Flap Handle index,number) 0.1 + 6.3 min (>L:Flap Handle index,number)
(L:Flap Handle index,number) 6.3 ==
if{ 0 (>L:Flap Handle,number) 0 (>L:Flap Handle index,number) }
}
els{
(L:Flap Handle,number) -1 ==
if{
(L:Flap Handle index,number) 0.1 - -6.3 max (>L:Flap Handle index,number)
(L:Flap Handle index,number) -6.3 ==
if{ 0 (>L:Flap Handle,number) 0 (>L:Flap Handle index,number) }
}
}
(L:Flap Handle index,number)
</Value>
<Delay degreesPerSecond="10"/>
</Rotate>
</Element>
<Mouse>

I checked the air.file and they were working without a line of FLAPS AVAILABLE but I added one first thing I tried.  Took it out and it doesn't make difference.  I put a working flaps handle from an A320 into the panel and it works.  When the flaps are retracted the handle rotates counterclockwise with the retracting A320 flaps as does the flaps indicator i have on the panel so this gauge retracts but does not extend.
      <Area Left="0" Top="0" Width="126" Height="126">
<Help ID="HELPID_GAUGE_FLAP_LEVER_SOLO"/>
<Tooltip ID="TOOLTIPTEXT_FLAP_LEVER_DEGREES"/>
<Cursor Type="Hand"/>
<Click Kind="LeftSingle+RightSingle" Repeat="Yes">
(M:Event) 'LeftSingle' scmp 0 ==
if{
(>K:FLAPS_DECR)
(A:TRAILING EDGE FLAPS LEFT PERCENT,PERCENT) 0 &gt;
if{ -1 (>L:Flap Handle,enum) }
}
(M:Event) 'RightSingle' scmp 0 ==
if{
(>K:FLAPS_INCR)
(A:TRAILING EDGE FLAPS LEFT PERCENT,PERCENT) 100 &lt;
if{ 1 (>L:Flap Handle,enum) }
}
</Click>
</Area>
   </Mouse>
</Gauge>
 
Would you please post the [flaps.0] section of your aircraft.cfg file?

As well, would you please attach the .bmp for your flap handle. Axis X=230, Y=35 looks very odd to me.

Thx
 
Last edited:
I downloaded Paul Clawson's BT-13 (just a guess) to have a look, and based on that freeware download, the following works:

Code:
<Gauge Name="FlapX" Version="1.0">
<Image Name="FlapBkgdX.bmp"/>
   <Element>
     <Position X="75" Y="75"/>
     <Image Name="FlapHandleX.bmp">
       <Axis X="3" Y="4"/>
     </Image>
     <Rotate>
       <Value>
         (L:Flap Handle index,number)
       </Value>
         <!--
           According the the Vultee BT-13 aircraft.cfg file, there are 3 notches of flaps and a 4 second extending time.
           4 second flap extension divided by 3 notches = 1.33 sec avg per notch of flaps
           The Flap crank handle is set up so that the handle rotates 1/3 of a full circle (120 degrees) for each of the 3 notches of flaps
           Therefore, 120 degrees rotation divided by 1.33 seconds = 90 degrees per second Delay
           The incremental degrees of flaps for each notch are not the same, so this timing is approximate only
         -->
       <Delay DegreesPerSecond="90"/>
     </Rotate>
   </Element>
   <Mouse>
     <Area Left="0" Top="0" Width="150" Height="150">
     <Help ID="HELPID_GAUGE_FLAP_LEVER_SOLO"/>
     <Tooltip ID="TOOLTIPTEXT_FLAP_LEVER_DEGREES"/>
     <Cursor Type="Hand"/>
       <Click Kind="LeftSingle+RightSingle" >
         (M:Event) 'RightSingle' scmp 0 ==
           if{
             (A:TRAILING EDGE FLAPS LEFT PERCENT,PERCENT) 100 &lt;
               if{
                 (>K:FLAPS_INCR)
                 (L:Flap Handle index,number) 2.1 + 6.3 min (>L:Flap Handle index,number)
                 (L:Flap Handle index,number) 6.3 &gt;=
                   if{
                     0 (>L:Flap Handle index,number)
                   }
               }
           }
         (M:Event) 'LeftSingle' scmp 0 ==
           if{
             (A:TRAILING EDGE FLAPS LEFT PERCENT,PERCENT) 0 &gt;
               if{
                 (>K:FLAPS_DECR)
                 (L:Flap Handle index,number) 2.1 - -6.3 max (>L:Flap Handle index,number)
                 (L:Flap Handle index,number) -6.3 &lt;=
                   if{
                       0 (>L:Flap Handle index,number)
                   }
               }
           }
       </Click>
     </Area>
   </Mouse>
</Gauge>


For convenience, I set up the flaps handle as a separate window in panel.cfg:
Code:
[Window Titles]
Window00=Main Panel
Window01=FLAPX

Code:
//----------- FLAPX -------------------
[Window01]
size_mm=150,150
window_size_ratio=1.00
position=0
visible=1
gauge00=Vultee!FlapX,    0,    0,    150,    150


Finally, the [flaps.0] section from the aircraft.cfg:
Code:
[Flaps.0]
type= 1
span-outboard= 0.5
extending-time= 4.0
flaps-position.0= 0.0, 0.0
flaps-position.1= 12.00, 0.0
flaps-position.2= 25.0, 0.0
flaps-position.3= 40.0, 0.0
damaging-speed=110 // KIAS
blowout-speed=130 // KIAS
lift_scalar=1.5
drag_scalar=2.8
pitch_scalar=1.8
system_type= 1

Very simplistic flap crank background and flap handle pics referenced in the XML are attached.

Note the Axis of the flap handle ... very different from yours, hence my question about your flap handle .bmp. See the cartoon diagram in response #6 of this FSDeveloper topic

Maybe this will help... Cheers,

Bob
 

Attachments

Last edited:
Put in my bmps your size and index; new BT-13; I use FS Panel Studio to edit my panels. I am going to try a manual window creation and see if that makes a dif. Put the gauge in its own window in the panel. Fired up FS9 and in mine it still does not rotate nor does my Flaps gauge. Is it the bmps???? would you try using my bmps and tell me if it works for you in your BT-13? Look here later. thank you.
 
Ok, your flap handle points to the left. Mine points to the right. So, your axis should work well enough.

Try the script I posted ... it will work using your pics , Position, Axis and Mouse click area values - it works fine for me.

If you are still having problems, then you've overlooked something, you have typos, or there is another problem somewhere else. You said "Put in my bmps your size and index" and I have no idea what you really mean, but sounds like trouble, mixing your pics and my sizes. Try doing this without FS Panel Studio

First, just use my script with no changes, panel.cfg entries, and bmps, and you will see how it works. Then, one by one, change things over to your pics.
 
I manually edited the panel.cfg and the window appears with the gauge bmps on it (a misplaced handle but that is because of your sizes no problem it should still go around) but it doesn't activate. I am beginning to wonder if its my FS9 installation??? I hope that it isn't I don't want to have to reinstall stuff again. This happened before in a different problem. I won't uninstall until I hear from you that you can make my bmps work on your BT-13. I don't understand why Jan's code worked perfectly and then all of sudden quits though as I said above if I activate the flaps with a different gauge in the same window, the indicator on the main panel works and flaps go down. When the other flaps handle is up my yellow handle rotates counterclockwise just as its supposed to
 
Back
Top