<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="50" Y="80"/> <!--x=68 Y=96 -->
<Image Name="Off Button.bmp" Bright="Yes"/>
</Element>
<!-- ======================= Hdg Hold Switch =================== -->
<Element>
<Position X="195" Y="96"/>
<Image Name="HDG Button.bmp" Bright="yes"/>
</Element>
<!-- ======================= Nav Hold Switch =================== -->
<Element>
<Position X="259" Y="96"/>
<Image Name="CAP Button.bmp" Bright="Yes"/>
</Element>
<!-- ==================== Localizer Hold Switch ============== -->
<Element>
<Position X="390" Y="96"/>
<Image Name="LOC Button.bmp" Bright="Yes"/>
</Element>
<!-- ===================== Approach Hold Switch ================ -->
<Element>
<Position X="321" Y="96"/>
<Image Name="TRK Button.bmp" Bright="Yes"/>
</Element>
<!-- ======================= Alt Hold Switch =================== -->
<Element>
<Position X="391" Y="244"/>
<Image Name="ALT Button.bmp" Bright="Yes"/>
</Element>
</Element>
<Mouse>
<!-- =========================== Mouse Stuff ========================= -->
<!-- AP on/off button -->
<Area Left="4" Top="8" Right="39" Bottom="68">
<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>
<!-- Heading button -->
<Area Left="126" Top="90" Right="168" Bottom="114">
<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) > 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>
<!-- Nav1 button -->
<Area Left="195" Top="90" Right="236" Bottom="114">
<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 -->
<Area Left="257" Top="90" Right="296" Bottom="114">
<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>
<!-- Localizer button -->
<Area Left="320" Top="92" Right="353" Bottom="111">
<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="390" Top="90" Right="428" Bottom="114">
<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) > 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>
</Mouse>
</Gauge>
<!--
must have these settings in a/c config:
[autopilot]
autopilot_available=1
flight_director_available=1 (also needed to capture alt & hdg)
G:Var1 straight and level button
G:Var2 timer for SandL button
G:Var3 sync timer
-->