<?xml version="1.0"?>

<!--

-->

<PropertyList>

  <name>Text Auto Pilot Instrument</name>
  <w-base>240</w-base>
  <h-base>16</h-base>

  <params>
    <ah-select>/autopilot/locks/altitude</ah-select>
    <tf-select>/autopilot/locks/altitude</tf-select>
    <mc-select>/autopilot/locks/altitude</mc-select>
  </params>

  <layers>
<!-- Titles -->
    <layer>
      <name>background</name>
      <texture>
        <path>Aircraft/B-52F/Panels/Instruments/Textures/trans-dgrey-bg.rgb</path>
      </texture>
      <w>240</w>
      <h>16</h>
      <transformations>
        <transformation>
          <type>x-shift</type>
          <offset>0</offset>
        </transformation>
        <transformation>
          <type>y-shift</type>
          <offset>0</offset>
        </transformation>
      </transformations>
    </layer>

<!-- All Off -->
    <layer>
      <name>Title</name>
      <type>text</type>
      <point-size>14</point-size>
      <color>
        <red>0.0</red>
        <green>1.0</green>
        <blue>0.0</blue>
      </color>
      <chunks>
        <chunk>
          <type>literal</type>
          <text>AP Mode: </text>
        </chunk>
      </chunks>
      <transformations>
        <transformation>
          <type>x-shift</type>
          <offset>-112</offset>
        </transformation>
        <transformation>
          <type>y-shift</type>
          <offset>-4</offset>
        </transformation>
      </transformations>
    </layer>

    <layer>
      <name>Altitude hold - Off</name>
      <type>text</type>
      <point-size>14</point-size>
      <color>
        <red>0.0</red>
        <green>1.0</green>
        <blue>0.0</blue>
      </color>
      <chunks>
        <chunk>
          <type>literal</type>
          <text>AH</text>
        </chunk>
      </chunks>
      <transformations>
        <transformation>
          <type>x-shift</type>
          <offset>-25</offset>
        </transformation>
        <transformation>
          <type>y-shift</type>
          <offset>-4</offset>
        </transformation>
      </transformations>
    </layer>

    <layer>
      <name>Terrain Follow - Off</name>
      <type>text</type>
      <point-size>14</point-size>
      <color>
        <red>0.0</red>
        <green>1.0</green>
        <blue>0.0</blue>
      </color>
      <chunks>
        <chunk>
          <type>literal</type>
          <text>TF</text>
        </chunk>
      </chunks>
      <transformations>
        <transformation>
          <type>x-shift</type>
          <offset>3</offset>
        </transformation>
        <transformation>
          <type>y-shift</type>
          <offset>-4</offset>
        </transformation>
      </transformations>
    </layer>

    <layer>
      <condition>
        <equals>
          <property>/autopilot/locks/auto-take-off</property>
          <value>disabled</value>
        </equals>
      </condition>
      <name>Take-Off - disabled</name>
      <type>text</type>
      <point-size>14</point-size>
      <color>
        <red>0.8</red>
        <green>0.8</green>
        <blue>0.8</blue>
      </color>
      <chunks>
        <chunk>
          <type>literal</type>
          <text>TO</text>
        </chunk>
      </chunks>
      <transformations>
        <transformation>
          <type>x-shift</type>
          <offset>31</offset>
        </transformation>
        <transformation>
          <type>y-shift</type>
          <offset>-4</offset>
        </transformation>
      </transformations>
    </layer>

    <layer>
      <condition>
        <equals>
          <property>/autopilot/locks/auto-take-off</property>
          <value>enabled</value>
        </equals>
      </condition>
      <name>Take-Off - enabled</name>
      <type>text</type>
      <point-size>14</point-size>
      <color>
        <red>0.0</red>
        <green>1.0</green>
        <blue>0.0</blue>
      </color>
      <chunks>
        <chunk>
          <type>literal</type>
          <text>TO</text>
        </chunk>
      </chunks>
      <transformations>
        <transformation>
          <type>x-shift</type>
          <offset>31</offset>
        </transformation>
        <transformation>
          <type>y-shift</type>
          <offset>-4</offset>
        </transformation>
      </transformations>
    </layer>

    <layer>
      <condition>
        <equals>
          <property>/autopilot/locks/auto-landing</property>
          <value>disabled</value>
        </equals>
      </condition>
      <name>Instrument Landing - disabled</name>
      <type>text</type>
      <point-size>14</point-size>
      <color>
        <red>0.8</red>
        <green>0.8</green>
        <blue>0.8</blue>
      </color>
      <chunks>
        <chunk>
          <type>literal</type>
          <text>IL</text>
        </chunk>
      </chunks>
      <transformations>
        <transformation>
          <type>x-shift</type>
          <offset>63</offset>
        </transformation>
        <transformation>
          <type>y-shift</type>
          <offset>-4</offset>
        </transformation>
      </transformations>
    </layer>

    <layer>
      <condition>
        <equals>
          <property>/autopilot/locks/auto-landing</property>
          <value>enabled</value>
        </equals>
      </condition>
      <name>Instrument Landing - enabled</name>
      <type>text</type>
      <point-size>14</point-size>
      <color>
        <red>0.0</red>
        <green>1.0</green>
        <blue>0.0</blue>
      </color>
      <chunks>
        <chunk>
          <type>literal</type>
          <text>IL</text>
        </chunk>
      </chunks>
      <transformations>
        <transformation>
          <type>x-shift</type>
          <offset>63</offset>
        </transformation>
        <transformation>
          <type>y-shift</type>
          <offset>-4</offset>
        </transformation>
      </transformations>
    </layer>

<!-- Mach Climb -->
    <layer>
      <condition>
        <not-equals>
          <property>/autopilot/locks/speed</property>
          <value>mach-with-throttle</value>
        </not-equals>
      </condition>
      <name>Mach Climb disabled</name>
      <type>text</type>
      <point-size>14</point-size>
      <color>
        <red>0.8</red>
        <green>0.8</green>
        <blue>0.8</blue>
      </color>
      <chunks>
        <chunk>
          <type>literal</type>
          <text>MC</text>
        </chunk>
      </chunks>
      <transformations>
        <transformation>
          <type>x-shift</type>
          <offset>87</offset>
        </transformation>
        <transformation>
          <type>y-shift</type>
          <offset>-4</offset>
        </transformation>
      </transformations>
    </layer>

    <layer>
      <condition>
        <equals>
          <property>/autopilot/locks/speed</property>
          <value>mach-with-throttle</value>
        </equals>
      </condition>
      <name>Mach Climb - enabled</name>
      <type>text</type>
      <point-size>14</point-size>
      <color>
        <red>0.0</red>
        <green>1.0</green>
        <blue>0.0</blue>
      </color>
      <chunks>
        <chunk>
          <type>literal</type>
          <text>MC</text>
        </chunk>
      </chunks>
      <transformations>
        <transformation>
          <type>x-shift</type>
          <offset>87</offset>
        </transformation>
        <transformation>
          <type>y-shift</type>
          <offset>-4</offset>
        </transformation>
      </transformations>
    </layer>

<!-- AP Activated -->
    <layer>
      <condition>
        <not-equals>
          <property>/autopilot/locks/altitude</property>
          <value></value>
        </not-equals>
      </condition>
      <name>Title</name>
      <type>text</type>
      <point-size>14</point-size>
      <color>
        <red>1.0</red>
        <green>0.0</green>
        <blue>0.0</blue>
      </color>
      <chunks>
        <chunk>
          <type>literal</type>
          <text>AP Mode: </text>
        </chunk>
      </chunks>
      <transformations>
        <transformation>
          <type>x-shift</type>
          <offset>-112</offset>
        </transformation>
        <transformation>
          <type>y-shift</type>
          <offset>-4</offset>
        </transformation>
      </transformations>
    </layer>

<!-- Altitude Lock -->
    <layer>
      <condition>
        <equals>
          <property>/autopilot/locks/altitude</property>
          <value>altitude-hold</value>
        </equals>
      </condition>
      <name>Alitude Hold Engaged</name>
      <type>text</type>
      <point-size>14</point-size>
      <color>
        <red>1.0</red>
        <green>0.0</green>
        <blue>0.0</blue>
      </color>
      <chunks>
        <chunk>
          <type>literal</type>
          <text>AH</text>
        </chunk>
      </chunks>
      <transformations>
        <transformation>
          <type>x-shift</type>
          <offset>-25</offset>
        </transformation>
        <transformation>
          <type>y-shift</type>
          <offset>-4</offset>
        </transformation>
      </transformations>
    </layer>

<!-- AGL Hold -->
  <layer>
   <condition>
    <equals>
     <property>/autopilot/locks/altitude</property>
     <value>agl-hold</value>
    </equals>
   </condition>
   <name>Terain Follow Engaged</name>
   <type>text</type>
   <point-size>14</point-size>
   <color>
    <red>1.0</red>
    <green>0.0</green>
    <blue>0.0</blue>
   </color>
   <chunks>
    <chunk>
     <type>literal</type>
     <text>TF</text>
    </chunk>
   </chunks>
   <transformations>
    <transformation>
     <type>x-shift</type>
     <offset>3</offset>
    </transformation>
    <transformation>
     <type>y-shift</type>
     <offset>-4</offset>
    </transformation>
   </transformations>
  </layer>

<!-- Take Off -->
<!-- Ground Roll Phase -->
  <layer>
   <condition>
    <equals>
     <property>/autopilot/locks/altitude</property>
     <value>ground-roll</value>
    </equals>
   </condition>
   <name>Rotate Engaged</name>
   <type>text</type>
   <point-size>14</point-size>
   <color>
    <red>1.0</red>
    <green>1.0</green>
    <blue>0.0</blue>
   </color>
   <chunks>
    <chunk>
     <type>literal</type>
     <text>TO</text>
    </chunk>
   </chunks>
   <transformations>
    <transformation>
     <type>x-shift</type>
     <offset>31</offset>
    </transformation>
    <transformation>
     <type>y-shift</type>
     <offset>-4</offset>
    </transformation>
   </transformations>
  </layer>

<!-- Rotate Phase -->
  <layer>
   <condition>
    <equals>
     <property>/autopilot/locks/altitude</property>
     <value>take-off</value>
    </equals>
   </condition>
   <name>Rotate Engaged</name>
   <type>text</type>
   <point-size>14</point-size>
   <color>
    <red>1.0</red>
    <green>0.0</green>
    <blue>0.0</blue>
   </color>
   <chunks>
    <chunk>
     <type>literal</type>
     <text>TO</text>
    </chunk>
   </chunks>
   <transformations>
    <transformation>
     <type>x-shift</type>
     <offset>31</offset>
    </transformation>
    <transformation>
     <type>y-shift</type>
     <offset>-4</offset>
    </transformation>
   </transformations>
  </layer>

<!-- Climb Out Phase -->
  <layer>
   <condition>
    <equals>
     <property>/autopilot/locks/altitude</property>
     <value>climb-out</value>
    </equals>
   </condition>
   <name>Climb Out Engaged</name>
   <type>text</type>
   <point-size>14</point-size>
   <color>
    <red>1.0</red>
    <green>0.5</green>
    <blue>0.0</blue>
   </color>
   <chunks>
    <chunk>
     <type>literal</type>
     <text>TO</text>
    </chunk>
   </chunks>
   <transformations>
    <transformation>
     <type>x-shift</type>
     <offset>31</offset>
    </transformation>
    <transformation>
     <type>y-shift</type>
     <offset>-4</offset>
    </transformation>
   </transformations>
  </layer>

<!-- Instrument Landing -->
<!-- nav1 hold & VFPS hold -->
  <layer>
    <condition>
      <and>
        <equals>
          <property>/autopilot/locks/heading</property>
          <value>nav1-hold</value>
        </equals>
        <equals>
          <property>/autopilot/locks/altitude</property>
          <value>vfps-hold</value>
        </equals>
      </and>
    </condition>
    <name>Instrument Landing Engaged 2</name>
    <type>text</type>
    <point-size>14</point-size>
    <color>
      <red>1.0</red>
      <green>0.0</green>
      <blue>1.0</blue>
    </color>
    <chunks>
      <chunk>
        <type>literal</type>
        <text>IL</text>
      </chunk>
    </chunks>
    <transformations>
      <transformation>
        <type>x-shift</type>
        <offset>63</offset>
      </transformation>
      <transformation>
        <type>y-shift</type>
        <offset>-4</offset>
      </transformation>
    </transformations>
  </layer>

<!-- nav1 hold & Flaps -->
  <layer>
    <condition>
      <and>
        <equals>
          <property>/autopilot/locks/heading</property>
          <value>nav1-hold</value>
        </equals>
        <equals>
          <property>/controls/flight/flaps</property>
          <value>1</value>
        </equals>
      </and>
    </condition>
    <name>Instrument Landing Engaged 2</name>
    <type>text</type>
    <point-size>14</point-size>
    <color>
      <red>1.0</red>
      <green>0.5</green>
      <blue>0.0</blue>
    </color>
    <chunks>
      <chunk>
        <type>literal</type>
        <text>IL</text>
      </chunk>
    </chunks>
    <transformations>
      <transformation>
        <type>x-shift</type>
        <offset>63</offset>
      </transformation>
      <transformation>
        <type>y-shift</type>
        <offset>-4</offset>
      </transformation>
    </transformations>
  </layer>

<!-- VFPS hold & < 400 ft agl -->
  <layer>
    <condition>
      <and>
        <equals>
          <property>/autopilot/locks/altitude</property>
          <value>vfps-hold</value>
        </equals>
        <less-than>
          <property>/position/altitude-agl-ft</property>
          <value>400</value>
        </less-than>
      </and>
    </condition>
    <name>Instrument Landing Engaged 1</name>
    <type>text</type>
    <point-size>14</point-size>
    <color>
      <red>1.0</red>
      <green>0.0</green>
      <blue>0.0</blue>
    </color>
    <chunks>
      <chunk>
        <type>literal</type>
        <text>IL</text>
      </chunk>
    </chunks>
    <transformations>
      <transformation>
        <type>x-shift</type>
        <offset>63</offset>
      </transformation>
      <transformation>
        <type>y-shift</type>
        <offset>-4</offset>
      </transformation>
    </transformations>
  </layer>

<!-- Mach Climb Engaged -->
  <layer>
   <condition>
    <equals>
     <property>/autopilot/locks/altitude</property>
     <value>mach-climb</value>
    </equals>
   </condition>
   <name>Mach Climb - Engaged</name>
   <type>text</type>
   <point-size>14</point-size>
   <color>
    <red>1.0</red>
    <green>0.4</green>
    <blue>0.4</blue>
   </color>
   <chunks>
    <chunk>
     <type>literal</type>
     <text>MC</text>
    </chunk>
   </chunks>
   <transformations>
    <transformation>
     <type>x-shift</type>
     <offset>87</offset>
    </transformation>
    <transformation>
     <type>y-shift</type>
     <offset>-4</offset>
    </transformation>
   </transformations>
  </layer>

 </layers>

  <actions>

<!-- Disengage Autopilot -->
    <action>
      <name>Autopilot Off</name>
      <button>0</button>
      <x>-115</x>
      <y>-10</y>
      <w>90</w>
      <h>18</h>
      <binding>
        <command>property-assign</command>
        <property alias="../../../../params/ah-select"/>
        <value type="string"></value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/heading</property>
        <value type="string"></value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/auto-take-off</property>
        <value type="string">enabled</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/auto-landing</property>
        <value type="string">disabled</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/aoa</property>
        <value type="string">disabled</value>
      </binding>
    </action>

<!-- Engage Alititude Hold -->
    <action>
      <name>Altitude Hold Select</name>
      <button>0</button>
      <x>-26</x>
      <y>-10</y>
      <w>28</w>
      <h>18</h>
      <binding>
        <command>property-assign</command>
        <property alias="../../../../params/ah-select"/>
        <value type="string">altitude-hold</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/auto-landing</property>
        <value type="string">enabled</value>
      </binding>
    </action>

<!-- Engage AGL Hold -->
    <action>
      <name>AGL Hold Select</name>
      <button>0</button>
      <x>2</x>
      <y>-10</y>
      <w>28</w>
      <h>18</h>
      <binding>
        <command>property-assign</command>
        <property alias="../../../../params/tf-select"/>
        <value type="string">agl-hold</value>
      </binding>
      <binding>
        <command>dialog-show</command>
        <dialog-name>TFA-popup</dialog-name>
      </binding>
    </action>

<!-- Engage Take-Off Mode -->
    <action>
      <name>Take Off Select</name>
      <button>0</button>
      <x>31</x>
      <y>-10</y>
      <w>28</w>
      <h>18</h>
      <binding>
        <command>nasal</command>
        <script>B52F.autotakeoff()</script>
      </binding>
    </action>

<!-- Engage instrument Landing -->
    <action>
      <name>Instrument Landing Select</name>
      <button>0</button>
      <x>60</x>
      <y>-10</y>
      <w>28</w>
      <h>18</h>
      <binding>
        <command>nasal</command>
        <script>B52F.autoland()</script>
      </binding>
    </action>

<!-- Engage Mach Climb -->
    <action>
      <name>Mach Climb Select</name>
      <button>0</button>
      <x>88</x>
      <y>-10</y>
      <w>28</w>
      <h>18</h>
      <binding>
        <condition>
          <equals>
            <property>/autopilot/locks/speed</property>
            <value>mach-with-throttle</value>
          </equals>
        </condition>
        <command>property-assign</command>
        <property alias="../../../../params/mc-select"/>
        <value type="string">mach-climb</value>
      </binding>
    </action>

  </actions>

</PropertyList>
