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

FSXA Missing Gauge

Messages
967
Country
us-northcarolina
Every time I write someone an email and say I am going to attach a photo (well almost every time) I forget and have to send another email if I catch it and be embarrased if I don't and
THEY have to ask where it is so don't feel like you are the only one. Looking forward to checking it out in just a little bit and will comment.
 
Messages
967
Country
us-northcarolina
Walter
The knob is working perfectly with the mouse wheel. I am looking forward to trying it out in the air. Can you please properly align the mouse click areas over each button correctly? I have my FS2X XML code tutorials and understand how to position it over one gauge with one button but don't have a clue how to do it with all these buttons. They are not where they should be.
 
Messages
258
Country
ireland
There you go (No code included for MAN Button)

I cannot test the code because I don't have a suitable aircraft in P3DV5 but it should be what is expected.

Code:
<Gauge Name="B-5C_Autopilot" Version="1.0">
<Image Name="B5C_Background.bmp"/>

<Element>
<Position X="214" Y="339" />
<Image Name="Gear_AmberLight_On.bmp" ImageSizes="20,20"/>
</Element>

<Element>

<!-- Autopilot OFF -->
<Element>
    <Position X="23" Y="47"/> <!--x=68 Y=96 -->
    <Image Name="Off Button.bmp" Bright="Yes"/>
    </Element>

<!-- ======================= Man Hold Switch =================== -->
  <Element>
     <Position X="95" Y="47"/>
     <Image Name="MAN Button.bmp" Bright="yes"/>
  </Element>


 <!-- ======================= Hdg Hold Switch =================== -->
  <Element>
     <Position X="165" Y="47"/>
     <Image Name="HDG Button.bmp" Bright="yes"/>
  </Element>

 <!-- ======================= Nav Hold Switch =================== -->
  <Element>
     <Position X="237" Y="47"/>
     <Image Name="CAP Button.bmp" Bright="Yes"/>
  </Element>

 <!-- ==================== Localizer Hold Switch ============== -->
  <Element>
     <Position X="385" Y="47"/>
     <Image Name="LOC Button.bmp" Bright="Yes"/>
  </Element>

 <!-- ===================== Approach Hold Switch ================ -->
  <Element>
     <Position X="312" Y="47"/>
     <Image Name="TRK Button.bmp" Bright="Yes"/>
  </Element>

 <!-- ======================= Alt Hold Switch =================== -->
  <Element>
     <Position X="350" Y="188"/>
     <Image Name="ALT Button.bmp" Bright="Yes"/>
  </Element>

 <!-- ======================= Turn Knob A =================== -->


 <Element>
   <Visible> (L:Turn Knob Position,number) -1 == </Visible>
      <Position X="45" Y="190"/>
      <Image Name="Turn Knob left.bmp" />
 </Element>

 <Element>
   <Visible> (L:Turn Knob Position,number) 0 == </Visible>
      <Position X="40" Y="185"/>
      <Image Name="Turn Knob up.bmp" />
 </Element>

 <Element>
   <Visible> (L:Turn Knob Position,number) 1 == </Visible>
      <Position X="40" Y="200"/>
      <Image Name="Turn Knob right.bmp" />
 </Element>

 <!-- ======================= Turn Knob B =================== -->

<!--

   <Element>
    <Position X="85" Y="250"/>
        <Image Name="Turn Knob up.bmp" PointsTo="East">\n
            <Axis X="50" Y="66"/>
        </Image>
        <Rotate>
         <Value Minimum="-1" Maximum="+1">(L:Turn Knob Position,number) </Value>
         <Nonlinearity>
            <Item Value="-1" Degrees="290"/>
            <Item Value="0" Degrees="0"/>
            <Item Value="+1" Degrees="70"/>
          </Nonlinearity>
      </Rotate>
       </Element>
-->


</Element>


<Mouse>

<!-- =========================== Mouse Stuff ========================= -->


    <!-- AP on/off button  -->
  <Area Left="36" Top="48" Right="91" Bottom="147">
    <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_MASTER"/>
      <Cursor Type="Hand"/>
       <Click>(A:Autopilot master, bool) if{

    (>K:AP_HDG_HOLD_OFF)
    (>K:AP_ALT_HOLD_OFF)
    (>K:AP_NAV1_HOLD_OFF)
    (>K:AUTOPILOT_OFF) }
    els{ (>K:AUTOPILOT_ON) }
      </Click>
  </Area>

    <!-- MAN button  -->
  <Area Left="102" Top="48" Right="166" Bottom="147">
    <Tooltip ID="TOOLTIPTEXT_MAN"/>
      <Cursor Type="Hand"/>
       <Click>
      </Click>
  </Area>

 <!-- Heading button  -->
  <Area Left="173" Top="48" Right="236" Bottom="147">
    <Tooltip>Heading hold, press 2 secs to sync </Tooltip>
    <Cursor Type="Hand"/>
    <Click Kind="LeftSingle+LeftRelease" Repeat = "no" >
       (M:Event) 'LeftSingle' scmp 0 == if{
          (P:Local time, seconds) 1 + (>G:Var3) }
    (M:Event) 'LeftRelease' scmp 0 == if{
      (P:Local time, seconds) (G:Var3) &gt; if{ (>K:AP_HDG_HOLD)
         (A:AUTOPILOT HEADING LOCK,bool) if{ (>K:AP_HDG_HOLD) } }
      els{ (A:AUTOPILOT HEADING LOCK,bool) if{
               (>K:AP_HDG_HOLD_OFF) } els{
           (>K:AP_HDG_HOLD_ON)
               (>K:AP_WING_LEVELER_OFF)
           (>K:AUTOPILOT_ON) }
      0 (>G:Var3) }
    </Click>
  </Area>


  <!-- Localizer button  -->
  <Area Left="386" Top="48" Right="447" Bottom="147">
    <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_LOC_HOLD"/>
    <Cursor Type="Hand"/>
      <Click> (A:Autopilot localizer hold, bool) if{
    (>K:AP_LOC_HOLD_OFF) (>K:AP_APR_HOLD_OFF) }
    els{
    (>K:AP__HOLD_ON) }
      </Click>
  </Area>

  <!-- Altitude button  -->
  <Area Left="359" Top="199" Right="422" Bottom="297">
    <Tooltip>Altitude hold, press 2 secs to sync </Tooltip>
    <Cursor Type="Hand"/>
     <Click Kind="LeftSingle+LeftRelease" Repeat = "no" >
       (M:Event) 'LeftSingle' scmp 0 == if{
          (P:Local time, seconds) 1 + (>G:Var3) }
    (M:Event) 'LeftRelease' scmp 0 == if{
      (P:Local time, seconds) (G:Var3) &gt; if{ (>K:AP_ALT_HOLD)
         (A:AUTOPILOT ALTITUDE LOCK,bool) if{ (>K:AP_ALT_HOLD) } }
      els{ (>K:AP_PANEL_ALTITUDE_HOLD) }
      0 (>G:Var3) }
     </Click>
  </Area>

  <!-- Nav1 button  ASSUMED as TRK Button-->
  <Area Left="314" Top="48" Right="378" Bottom="147">
    <Tooltip>Nav1 Hold (%((A:AUTOPILOT NAV1 LOCK,bool))%{if}on%{else}off%{end}) </Tooltip>
    <Cursor Type="Hand"/>
      <Click> (A:AUTOPILOT NAV1 LOCK,bool) if{
        (>K:AP_NAV1_HOLD_OFF) } els{
        (>K:AP_NAV1_HOLD_ON) }
      </Click>
  </Area>

  <!-- Approach button   ASSUMED as CAP Button -->
  <Area Left="242" Top="48" Right="305" Bottom="147">
    <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_APP_HOLD"/>
    <Cursor Type="Hand"/>
      <Click> (A:Autopilot approach hold, bool) if{
    (>K:AP_APR_HOLD_OFF) } els{
    (>K:AP_APR_HOLD_ON) (>K:AUTOPILOT_ON) }
      </Click>
  </Area>


  <!-- Turn button  -->
  <Area Left="30" Top="225" Right="140" Bottom="335">
     <Cursor Type="Hand"/>
     <Click Kind="WheelUp+WheelDown">
       (M:Event) 'WheelUp' scmp 0 ==
           if{ (L:Turn Knob Position,number) 1 &lt;
                   if{ (L:Turn Knob Position,number) ++ (&gt;L:Turn Knob Position,number) } }
       (M:Event) 'WheelDown' scmp 0 ==
           if{ (L:Turn Knob Position,number) -1 &gt;
                   if{ (L:Turn Knob Position,number) -- (&gt;L:Turn Knob Position,number) } }
       (L:Turn Knob Position,number) -1 == if{ +10000 (&gt;K:AILERON_SET) }
       (L:Turn Knob Position,number) 0  == if{ 0 (&gt;K:AILERON_SET) }
       (L:Turn Knob Position,number) +1 == if{ -10000 (&gt;K:AILERON_SET) }
    </Click>
  </Area>

  </Mouse>

</Gauge>
 
Messages
967
Country
us-northcarolina
This autopilot code came from a different autopilot and the click spots are not aligned properly. I guess that I will have to just play with them until they are where they belong. I will try and use Photoshop to get in the general areas. Thank you again for all your help. I have some analog gauges to create for the right hand side of the panel now that have no equivilents in other aircraft I have looked for. Talk with you later.

Richard
 
Messages
258
Country
ireland
I think you will find that if you press the button marked:

"OFF" then the Autopilot system will toggle on/off

"HDG" then the Autopilot system will go into HEADING Mode if the Autopilot is on.

"CAP" then the Autopilot system will toggle APPROACH Mode if the Autopilot is on.

"TRK" then the Autopilot system will go into HEADING Mode if the Autopilot is on.

"LOC" then the Autopilot system will go into Localiser Mode if the Autopilot is on.

"ALT" then the Autopilot system will go into ALTITUDE HOLD Mode if the Autopilot is on.

(More or less - the code is pretty complicated in places)

The button marked "MAN" has no code behind it.

As far as I can see the click spots are correctly placed for the actions above.
 
Messages
967
Country
us-northcarolina
I think you will find that if you press the button marked:

"OFF" then the Autopilot system will toggle on/off

"HDG" then the Autopilot system will go into HEADING Mode if the Autopilot is on.

"CAP" then the Autopilot system will toggle APPROACH Mode if the Autopilot is on.

"TRK" then the Autopilot system will go into HEADING Mode if the Autopilot is on.

"LOC" then the Autopilot system will go into Localiser Mode if the Autopilot is on.

"ALT" then the Autopilot system will go into ALTITUDE HOLD Mode if the Autopilot is on.

(More or less - the code is pretty complicated in places)

The button marked "MAN" has no code behind it.

As far as I can see the click spots are correctly placed for the actions above.
I just got the operating manual for the autopilot from the manufacturer that explains each button and what it does. I had to add the MAN button to the xml code mouse area. It is MANUAL which turns off the autopilot so that the turn button works. It is disabled when the autopilot is on.

It may be just my Spartan Executive panel and the sim but they are in the proper spots now that I figured out how to calculate the pixels on the background properly in Photoshop with the pixel counter F8 that I found how to online. I guess that the XML tutorial didn't specify how to do that because so many different photo programs each working differently. I am going to fly it in just a bit for a real test.

Richard
 
Messages
1,451
Country
mexico
Hello

I don't want to intrude, but I am wondering if this part of the AP code presented do prevent memory flooding in the same way:
HTML:
  <!-- ORIGINAL VERSION  -->
  <!-- Nav1 button  ASSUMED as TRK Button-->
  <Area Left="314" Top="48" Right="378" Bottom="147">
    <Tooltip>Nav1 Hold (%((A:AUTOPILOT NAV1 LOCK,bool))%{if}on%{else}off%{end}) </Tooltip>
    <Cursor Type="Hand"/>
      <Click> (A:AUTOPILOT NAV1 LOCK,bool) if{
        (>K:AP_NAV1_HOLD_OFF) } els{
        (>K:AP_NAV1_HOLD_ON) }
      </Click>
  </Area>

  <!-- VERSION 2 -->
  <!-- Nav1 button  ASSUMED as TRK Button-->
  <Area Left="314" Top="48" Right="378" Bottom="147">
    <Tooltip>Nav1 Hold (%((A:AUTOPILOT NAV1 LOCK,bool))%{if}on%{else}off%{end})</Tooltip>
    <Cursor Type="Hand"/>
      <Click>
        (A:AUTOPILOT NAV1 LOCK,bool)
            if{ (>K:AP_NAV1_HOLD_OFF) }
        (A:AUTOPILOT NAV1 LOCK,bool) !
            if{ (>K:AP_NAV1_HOLD_ON) }
      </Click>
  </Area>

In the original version makes sense, however, the way I learned to test a variable state before to allow a K:Event to happen is a bit different. My guess, is that both do the same... Do they?

Thank you and again, forvige my intrusion.
All the best, Sergio Kauffman.
 
Top