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

P3D v4 Toggle between Gauges in VC

Messages
116
Country
canada
Hi, just wondering how I would go about making an gauge that would toggle between two xml gauges. For example I have in my panel.cfg, I have gauge00=test!pfd 6,6,412,504 and I want to have another gauge ex. gauge00=test!mfd that shares the same position? Whats the best way to do this if that makes sense.

Thanks!
 
I remember having to do that for the Mooney Bravo.
You can either have the ADF or the VOR2 gauge. Just click on the magic screw to toggle.

XML:
<Gauge Name="ADF_VOR2_Combi" Version="1.0">
<Image Name="ADF_VOR2_Combi_Background.bmp"/>

<Element>
  <Select>
    <Value>(L:ADF_VOR2_Latch,Number) ! if{ 1 (&gt;L:ADF_VOR2_Latch,Number) 1 (&gt;L:VOR2_Selected,Number) }</Value>
  </Select>
</Element>

<Element>
  <Visible>(L:VOR2_Selected,Number)</Visible>
  <Image Name="ADF_VOR2_Combi_VOR2_Face.bmp"/>
</Element>

<!-- Compass -->
<Element>
  <Position X="-7.5" Y="-7.5" />
  <MaskImage Name="ADF_VOR2_Combi_Mask.bmp">
    <Axis X="87.5" Y="87.5" />
  </MaskImage>
  <Position X="-7.5" Y="-7.5" />
   <Image Transparent="True" Name="ADF_VOR2_Combi_Compass.bmp">
    <Axis X="87.5" Y="87.5" />
  </Image>
  <Rotate>
    <Value>(L:VOR2_Selected,Number) if{ (A:NAV OBS:2,Radians) /-/ } els{ (A:ADF CARD,Radians) /-/ }</Value>
    <Failures>
      <SYSTEM_ELECTRICAL_PANELS Action="Freeze" />
      <GAUGE_GYRO_HEADING Action="Freeze" />
    </Failures>
  </Rotate>
</Element>

<!-- To/From/Invalid -->
<Element>
  <Visible>(L:VOR2_Selected,Number)</Visible>
  <Position X="100" Y="80" />
  <Select>
    <Value>(A:NAV TOFROM:2,Enum)</Value>
    <Case Value="0">
      <Image Name="ADF_VOR2_Combi_VOR2_Invalid.bmp"/>
    </Case>
    <Case Value="1">
      <Image Name="ADF_VOR2_Combi_VOR2_To.bmp"/>
    </Case>
    <Case Value="2">
      <Image Name="ADF_VOR2_Combi_VOR2_From.bmp"/>
    </Case>
  </Select>
</Element>

<!-- VOR Needle -->
<Element>
  <Visible>(L:VOR2_Selected,Number)</Visible>
  <Position X="80" Y="34" />
  <Image Name="ADF_VOR2_Combi_VOR2_Needle.bmp">
    <Axis X="-3" Y="2" PointsTo="East" />
  </Image>
  <Rotate>
    <Value Minimum="-10" Maximum="10">(A:NAV TOFROM:2,Enum) 0 == (A:NAV SIGNAL:2,Number) 10 &lt; || if{ 0 } els{ (A:NAV TOFROM:2,Enum) 1 == if{ (A:NAV RADIAL ERROR:2,Degrees) } els{ (A:NAV RADIAL ERROR:2,Degrees) dnor 180 - }</Value>
    <Failures>
      <SYSTEM_ELECTRICAL_PANELS Action="0" />
      <SYSTEM_ELECTRICAL_AVIONICS Action="0" />
      <GAUGE_GYRO_HEADING Action="0" />
      <GAUGE_ADF Action="0" />
    </Failures>
    <Nonlinearity>
      <Item Value="10" X="112" Y="100" />
      <Item Value="0" X="80" Y="108" />
      <Item Value="-10" X="46" Y="100" />
    </Nonlinearity>
    <Delay DegreesPerSecond="30" />
  </Rotate>
</Element>

<!-- ADF Needle -->
<Element>
  <Visible>(L:ADF_Selected,Number)</Visible>
  <Position X="80" Y="80" />
  <Image Name="ADF_VOR2_Combi_ADF_Needle.bmp">
    <Axis X="53.5" Y="6" PointsTo="East" />
  </Image>
  <Rotate>
    <Value>(A:ADF1 RADIAL,Radians) pi 2 / -</Value>
    <Failures>
      <SYSTEM_ELECTRICAL_PANELS Action="Freeze" />
      <SYSTEM_ELECTRICAL_AVIONICS Action="Freeze" />
      <GAUGE_GYRO_HEADING Action="Freeze" />
      <GAUGE_ADF Action="Freeze" />
    </Failures>
    <Delay DegreesPerSecond="30" />
  </Rotate>
</Element>

<!-- OBS Knob -->
<Element>
  <Visible>(L:VOR2_Selected,Number)</Visible>
  <Position X="19" Y="142" />
  <Image Name="ADF_VOR2_Combi_VOR2_OBS_Knob.bmp">
    <Axis X="16" Y="16" />
  </Image>
  <Rotate>
    <Value>(A:NAV OBS:2,Radians) 3 *</Value>
  </Rotate>
</Element>

<!-- Heading Knob -->
<Element>
  <Visible>(L:ADF_Selected,Number)</Visible>
  <Position X="19" Y="142" />
  <Image Name="ADF_VOR2_Combi_ADF_Knob.bmp">
    <Axis X="16" Y="16" />
  </Image>
  <Rotate>
    <Value>(A:ADF CARD,Radians) 3 *</Value>
  </Rotate>
</Element>

<Element>
  <Visible>(L:ADF_Selected,Number)</Visible>
  <Image Name="ADF_VOR2_Combi_ADF_Face.bmp"/>
</Element>

<Mouse>
  <Tooltip>%( (L:ADF_Selected,Number) )%{if}ADF Bearing to Station (%( (A:ADF Radial:1,degrees) 90 ==)%{if}Not Receiving Station)%{else}%( (A:ADF Radial:1,degrees) 360 + (A:PLANE HEADING DEGREES GYRO, degrees) + d360)%!d!°)%{end}%{else}VOR2 Bearing %( (A:NAV RELATIVE BEARING TO STATION:2,Degrees) dnor)%!d!%&#176;</Tooltip>
  <Area Left="5" Right="20" Top="5" Bottom="20">
    <Visible>(L:ADF_Selected,Number)</Visible>
    <Tooltip>Select VOR2</Tooltip>
      <Cursor Type="Hand" />
      <Click>1 (&gt;L:VOR2_Selected,Number) 0 (&gt;L:ADF_Selected,Number)</Click>
    </Area>
    <Area Left="5" Right="20" Top="5" Bottom="20">
      <Visible>(L:VOR2_Selected,Number)</Visible>
      <Tooltip>Select ADF</Tooltip>
      <Cursor Type="Hand" />
      <Click>1 (&gt;L:ADF_Selected,Number) 0 (&gt;L:VOR2_Selected,Number)</Click>
    </Area>
  <Area Left="0" Right="37" Top="120" Bottom="155">
    <Tooltip>%( (L:ADF_Selected,Number) )%{if}ADF Card Heading (%( (A:ADF CARD,Degrees) )%!d!%&#176;)%{else}VHF Nav2 Course (%( (A:NAV2 OBS, degrees) )%!d!°)%{end}</Tooltip>
    <Area Right="18">
      <Cursor Type="DownArrow" />
      <Click Repeat="Yes">(L:VOR2_Selected,Number) if{ 1 (&gt;K:VOR2_OBI_DEC) } els{ 1 (&gt;K:ADF_CARD_DEC) }</Click>
    </Area>
    <Area Left="18">
      <Cursor Type="UpArrow" />
      <Click Repeat="Yes">(L:VOR2_Selected,Number) if{ 1 (&gt;K:VOR2_OBI_INC) } els{ 1 (&gt;K:ADF_CARD_INC) }</Click>
    </Area>
  </Area>
</Mouse>

</Gauge>
 
Back
Top