<?xml version="1.0"?>

<!--
_______________________________________________________________________________
KAP140 Two Axis with Altitude Preselect autopilot instrument.

3D version started 2007 by Ron Jensen, wino@jentronics.com.
Based on 2D version started 2004 by Roy Vegard Ovesen, rvovesen@tiscali.no.

This is an instrument configuration file for the open-source flight
simulator FlightGear (www.flightgear.org).  The file is an XML-encoded
FlightGear property list defining the instrument's animations and actions.

Actions are hotspots on the instrument that will respond to a mouse
click.  Actions always modify the values of properties, either by
adjusting them, toggling them, or swaping them with other
properties' values.
-->

<PropertyList>

    <params>
        <dial-10-ft>/autopilot/KAP140/settings/dial-10-ft</dial-10-ft>
        <dial-100-ft>/autopilot/KAP140/settings/dial-100-ft</dial-100-ft>

    </params>
    <name>KAP140TwoAxisAlt</name>
    <path>kap140.ac</path>

    <effect>
        <inherits-from>../../../../Effects/interior/lm-kap140r</inherits-from>
        <object-name>knob-outer</object-name>
        <object-name>knob-inner</object-name>
    </effect>
    <effect>
        <inherits-from>../../../../Effects/interior/lm-kap140</inherits-from>
        <object-name>base</object-name>
        <object-name>ap-btn</object-name>
        <object-name>hdg-btn</object-name>
        <object-name>nav-btn</object-name>
        <object-name>apr-btn</object-name>
        <object-name>alt-btn</object-name>
        <object-name>rev-btn</object-name>
        <object-name>dn-btn</object-name>
        <object-name>up-btn</object-name>
        <object-name>arm-btn</object-name>
        <object-name>baro-btn</object-name>
    </effect>

    <effect>
        <inherits-from>../../../../Effects/interior/c172p-interior-radiance</inherits-from>
        <object-name>pitch-axis-fail</object-name>
        <object-name>roll-axis-fail</object-name>
        <object-name>ap-ann</object-name>
        <object-name>rol-ann</object-name>
        <object-name>hdg-ann</object-name>
        <object-name>nav-ann</object-name>
        <object-name>nav-arm-ann</object-name>
        <object-name>apr-ann</object-name>
        <object-name>apr-arm-ann</object-name>
        <object-name>rev-ann</object-name>
        <object-name>rev-arm-ann</object-name>
        <object-name>vs-ann</object-name>
        <object-name>alt-ann</object-name>
        <object-name>alt-arm-ann</object-name>
        <object-name>alert-ann</object-name>
        <object-name>gs-ann</object-name>
        <object-name>gs-arm-ann</object-name>
        <object-name>pt-ann</object-name>
        <object-name>pt-down-ann</object-name>
        <object-name>fpm-ann</object-name>
        <object-name>vs-minus</object-name>
        <object-name>vs-digit2-minus</object-name>
        <object-name>vs-digit3-minus</object-name>
        <object-name>vs-digit4-minus</object-name>
        <object-name>vs-digit5-minus</object-name>
        <object-name>vs-digit2</object-name>
        <object-name>vs-digit3</object-name>
        <object-name>vs-digit4</object-name>
        <object-name>vs-digit5</object-name>
        <object-name>inhg-digits</object-name>
        <object-name>hg-ann</object-name>
        <object-name>in-ann</object-name>
        <object-name>inhg-digit2</object-name>
        <object-name>inhg-digit3</object-name>
        <object-name>inhg-digit4</object-name>
        <object-name>inhg-digit5</object-name>
    </effect>

    <animation>
        <type>material</type>
        <object-name>knob-outer</object-name>
        <object-name>knob-inner</object-name>
        <object-name>base</object-name>
        <object-name>ap-btn</object-name>
        <object-name>hdg-btn</object-name>
        <object-name>nav-btn</object-name>
        <object-name>apr-btn</object-name>
        <object-name>alt-btn</object-name>
        <object-name>rev-btn</object-name>
        <object-name>dn-btn</object-name>
        <object-name>up-btn</object-name>
        <object-name>arm-btn</object-name>
        <object-name>baro-btn</object-name>
        <condition>
            <not>
                <property>/sim/rendering/shaders/skydome</property>
            </not>
        </condition>
        <emission>
            <red-prop>/sim/model/c172p/lighting/rgb-ra-r-factor</red-prop>
            <green-prop>/sim/model/c172p/lighting/rgb-ra-g-factor</green-prop>
            <blue-prop>/sim/model/c172p/lighting/rgb-ra-b-factor</blue-prop>
        </emission>
    </animation>

    <animation>
        <type>material</type>
        <object-name>buttons</object-name>
        <emission>
            <red>0.5</red>
            <green>0.1</green>
            <blue>0.00005</blue>
            <factor-prop>/sim/model/c172p/lighting/ap</factor-prop>
        </emission>
    </animation>

    <!-- Annunciators -->
    <animation>
        <type>select</type>
        <object-name>pitch-axis-fail</object-name>
        <name>Pitch Axis Failure</name>
        <condition>
            <property>/autopilot/KAP140/annunciators/pitchfail</property>
            <value type="bool">true</value>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>roll-axis-fail</object-name>
        <name>Roll Axis Failure</name>
        <condition>
            <property>/autopilot/KAP140/annunciators/rollfail</property>
            <value type="bool">true</value>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>ap-ann</object-name>
        <name>AP Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/ap/state</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>rol-ann</object-name>
        <name>ROL Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/rol</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>hdg-ann</object-name>
        <name>HDG Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/hdg/state</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>nav-ann</object-name>
        <name>NAV Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/nav</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>nav-arm-ann</object-name>
        <name>NAV ARM Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/nav-arm</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>apr-ann</object-name>
        <name>APR Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/apr</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>apr-arm-ann</object-name>
        <name>APR-ARM Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/apr-arm</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>rev-ann</object-name>
        <name>REV Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/rev</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>rev-arm-ann</object-name>
        <name>REV-ARM Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/rev-arm</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>vs-ann</object-name>
        <name>VS Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/vs</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>alt-ann</object-name>
        <name>ALT Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/alt</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>alt-arm-ann</object-name>
        <name>ALT-ARM Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/alt-arm</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>alert-ann</object-name>
        <name>ALERT Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/alt-alert/state</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>gs-ann</object-name>
        <name>GS Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/gs</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>gs-arm-ann</object-name>
        <name>GS-ARM Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/gs-arm</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>pt-ann</object-name>
        <name>Pitch trim annunciator</name>
        <condition>
            <or>
                <and>
                    <equals>
                        <property>/autopilot/KAP140/annunciators/pt-up</property>
                        <value type="bool">true</value>
                    </equals>
                </and>
                <and>
                    <equals>
                        <property>/autopilot/KAP140/annunciators/pt-dn</property>
                        <value type="bool">true</value>
                    </equals>
                </and>
            </or>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>pt-up-ann</object-name>
        <name>Pitch trim up annunciator</name>
        <condition>
            <and>
                <equals>
                    <property>/autopilot/KAP140/annunciators/pt-up</property>
                    <value type="bool">true</value>
                </equals>
            </and>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>pt-down-ann</object-name>
        <name>Pitch trim down annunciator</name>
        <condition>
            <and>
                <equals>
                    <property>/autopilot/KAP140/annunciators/pt-dn</property>
                    <value type="bool">true</value>
                </equals>
            </and>
        </condition>
    </animation>

    <!-- vs-setting -->
    <animation>
        <type>select</type>
        <object-name>fpm-ann</object-name>
        <name>FPM Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/vs-number</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>vs-minus</object-name>
        <object-name>vs-digit2-minus</object-name>
        <object-name>vs-digit3-minus</object-name>
        <object-name>vs-digit4-minus</object-name>
        <object-name>vs-digit5-minus</object-name>
        <condition>
            <and>
                <equals>
                    <property>/autopilot/KAP140/annunciators/vs-number</property>
                    <value type="bool">true</value>
                </equals>
                <less-than>
                    <property>/autopilot/KAP140/settings/target-pressure-rate-fpm</property>
                    <value>-1.0</value>
                </less-than>
            </and>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>vs-digit2</object-name>
        <object-name>vs-digit3</object-name>
        <object-name>vs-digit4</object-name>
        <object-name>vs-digit5</object-name>
        <condition>
            <and>
                <equals>
                    <property>/autopilot/KAP140/annunciators/vs-number</property>
                    <value type="bool">true</value>
                </equals>
                <greater-than-equals>
                    <property>/autopilot/KAP140/settings/target-pressure-rate-fpm</property>
                    <value>-1.0</value>
                </greater-than-equals>
            </and>
        </condition>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>vs-digit5</object-name>
        <property>/autopilot/KAP140/settings/target-pressure-rate-fpm</property>
        <factor>0.1</factor>
        <step>1</step>
        <bias>0.5</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>vs-digit4</object-name>
        <property>/autopilot/KAP140/settings/target-pressure-rate-fpm</property>
        <factor>0.01</factor>
        <step>10</step>
        <bias>0.5</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>vs-digit3</object-name>
        <property>/autopilot/KAP140/settings/target-pressure-rate-fpm</property>
        <factor>0.001</factor>
        <step>100</step>
        <bias>0.5</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>vs-digit2</object-name>
        <property>/autopilot/KAP140/settings/target-pressure-rate-fpm</property>
        <factor>0.0001</factor>
        <step>1000</step>
        <bias>0.5</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>vs-digit5-minus</object-name>
        <property>/autopilot/KAP140/settings/target-pressure-rate-fpm</property>
        <factor>-0.1</factor>
        <step>1</step>
        <bias>0.5</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>vs-digit4-minus</object-name>
        <property>/autopilot/KAP140/settings/target-pressure-rate-fpm</property>
        <factor>-0.01</factor>
        <step>10</step>
        <bias>9.5</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>vs-digit3-minus</object-name>
        <property>/autopilot/KAP140/settings/target-pressure-rate-fpm</property>
        <factor>-0.001</factor>
        <step>100</step>
        <bias>99.5</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>vs-digit2-minus</object-name>
        <property>/autopilot/KAP140/settings/target-pressure-rate-fpm</property>
        <factor>-0.0001</factor>
        <step>1000</step>
        <bias>999.5</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <!-- alt-setting -->
    <animation>
        <type>select</type>
        <object-name>alt-digits</object-name>
        <object-name>ft-ann</object-name>
        <name>FT Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/alt-number</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>alt-digit1</object-name>
        <property>/autopilot/KAP140/settings/target-alt-ft</property>
        <factor>0.00001</factor>
        <step>10000</step>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>alt-digit2</object-name>
        <property>/autopilot/KAP140/settings/target-alt-ft</property>
        <factor>0.0001</factor>
        <step>1000</step>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>alt-digit3</object-name>
        <property>/autopilot/KAP140/settings/target-alt-ft</property>
        <factor>0.001</factor>
        <step>100</step>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>alt-digit4</object-name>
        <property>/autopilot/KAP140/settings/target-alt-ft</property>
        <factor>0.01</factor>
        <step>10</step>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>alt-digit5</object-name>
        <property>/autopilot/KAP140/settings/target-alt-ft</property>
        <factor>0.1</factor>
        <step>1</step>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <!-- baro-setting-hpa -->
    <animation>
        <type>select</type>
        <object-name>hpa-digits</object-name>
        <object-name>hpa-ann</object-name>
        <name>hPa Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/bs-hpa-number</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>hpa-digit2</object-name>
        <property>/autopilot/KAP140/settings/baro-setting-hpa</property>
        <factor>0.0001</factor>
        <step>1000</step>
        <bias>0.0005</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>hpa-digit3</object-name>
        <property>/autopilot/KAP140/settings/baro-setting-hpa</property>
        <factor>0.001</factor>
        <step>100</step>
        <bias>0.0005</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>hpa-digit4</object-name>
        <property>/autopilot/KAP140/settings/baro-setting-hpa</property>
        <factor>0.01</factor>
        <step>10</step>
        <bias>0.0005</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>hpa-digit5</object-name>
        <property>/autopilot/KAP140/settings/baro-setting-hpa</property>
        <factor>0.1</factor>
        <step>1</step>
        <bias>0.0005</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>
    <!--
        <name>Baro Setting hPa number</name>
        <condition>
          <equals>
            <property>/autopilot/KAP140/annunciators/bs-hpa-number</property>
            <value type="bool">true</value>
          </equals>
        </condition>
        <chunk>
          <type>number-value</type>
          <property>/autopilot/KAP140/settings/baro-setting-hpa</property>
          <scale>1</scale>
          <format>%01.3f</format>
        </chunk>
    -->

    <!-- baro-setting-inhg -->
    <animation>
        <type>select</type>
        <object-name>inhg-digits</object-name>
        <object-name>hg-ann</object-name>
        <object-name>in-ann</object-name>
        <name>IN HG Anunciator</name>
        <condition>
            <equals>
                <property>/autopilot/KAP140/annunciators/bs-inhg-number</property>
                <value type="bool">true</value>
            </equals>
        </condition>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>inhg-digit2</object-name>
        <property>/autopilot/KAP140/settings/baro-setting-inhg</property>
        <factor>0.01</factor>
        <step>10</step>
        <bias>0.005</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>inhg-digit3</object-name>
        <property>/autopilot/KAP140/settings/baro-setting-inhg</property>
        <factor>0.1</factor>
        <step>1</step>
        <bias>0.005</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>inhg-digit4</object-name>
        <property>/autopilot/KAP140/settings/baro-setting-inhg</property>
        <factor>1</factor>
        <step>0.1</step>
        <bias>0.005</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>textranslate</type>
        <object-name>inhg-digit5</object-name>
        <property>/autopilot/KAP140/settings/baro-setting-inhg</property>
        <factor>10</factor>
        <step>0.01</step>
        <bias>0.005</bias>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <!-- Actions -->
    <animation>
        <type>pick</type>
        <object-name>ap-btn</object-name>
        <action>
            <name>AP Button</name>
            <button>0</button>
            <binding>
                <command>nasal</command>
                <script>kap140.apButton();c172p.click("kap140")</script>
            </binding>
            <binding>
                <command>property-toggle</command>
                <property>/instrumentation/ap-btn</property>
            </binding>
            <mod-up>
                <binding>
                    <command>property-toggle</command>
                    <property>/instrumentation/ap-btn</property>
                </binding>
            </mod-up>
        </action>
        <hovered>
            <binding>
                <command>set-tooltip</command>
                <tooltip-id>kap140-ap-btn</tooltip-id>
                <label>Autopilot Arm/Disarm</label>
            </binding>
        </hovered>
    </animation>

    <animation>
        <type>translate</type>
        <object-name>ap-btn</object-name>
        <property>/instrumentation/ap-btn</property>
        <factor>-0.004</factor>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>hdg-btn</object-name>
        <action>
            <name>HDG Button</name>
            <button>0</button>
            <binding>
                <command>nasal</command>
                <script>kap140.hdgButton();c172p.click("kap140")</script>
            </binding>
            <binding>
                <command>property-toggle</command>
                <property>/instrumentation/hdg-btn</property>
            </binding>
            <mod-up>
                <binding>
                    <command>property-toggle</command>
                    <property>/instrumentation/hdg-btn</property>
                </binding>
            </mod-up>
        </action>
        <hovered>
            <binding>
                <command>set-tooltip</command>
                <tooltip-id>kap140-hdg-btn</tooltip-id>
                <label>HDG: %s</label>
                <mapping>on-off</mapping>
                <property>autopilot/KAP140/locks/hdg-hold</property>
            </binding>
        </hovered>
    </animation>

    <animation>
        <type>translate</type>
        <object-name>hdg-btn</object-name>
        <property>/instrumentation/hdg-btn</property>
        <factor>-0.004</factor>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>nav-btn</object-name>
        <action>
            <name>NAV Button</name>
            <button>0</button>
            <binding>
                <command>nasal</command>
                <script>kap140.navButton();c172p.click("kap140")</script>
            </binding>
            <binding>
                <command>property-toggle</command>
                <property>/instrumentation/nav-btn</property>
            </binding>
            <mod-up>
                <binding>
                    <command>property-toggle</command>
                    <property>/instrumentation/nav-btn</property>
                </binding>
            </mod-up>
        </action>
        <hovered>
            <binding>
                <command>set-tooltip</command>
                <tooltip-id>kap140-nav-btn</tooltip-id>
                <label>NAV: %s</label>
                <mapping>on-off</mapping>
                <property>autopilot/KAP140/locks/nav-hold</property>
            </binding>
        </hovered>
    </animation>

    <animation>
        <type>translate</type>
        <object-name>nav-btn</object-name>
        <property>/instrumentation/nav-btn</property>
        <factor>-0.004</factor>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>apr-btn</object-name>
        <action>
            <name>APR Button</name>
            <button>0</button>
            <binding>
                <command>nasal</command>
                <script>kap140.aprButton();c172p.click("kap140")</script>
            </binding>
            <binding>
                <command>property-toggle</command>
                <property>/instrumentation/apr-btn</property>
            </binding>
            <mod-up>
                <binding>
                    <command>property-toggle</command>
                    <property>/instrumentation/apr-btn</property>
                </binding>
            </mod-up>
        </action>
        <hovered>
            <binding>
                <command>set-tooltip</command>
                <tooltip-id>kap140-apr-btn</tooltip-id>
                <label>APR: %s</label>
                <mapping>on-off</mapping>
                <property>autopilot/KAP140/locks/apr-hold</property>
            </binding>
        </hovered>
    </animation>

    <animation>
        <type>translate</type>
        <object-name>apr-btn</object-name>
        <property>/instrumentation/apr-btn</property>
        <factor>-0.004</factor>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>alt-btn</object-name>
        <action>
            <name>ALT Button</name>
            <button>0</button>
            <binding>
                <command>nasal</command>
                <script>kap140.altButton();c172p.click("kap140")</script>
            </binding>
            <binding>
                <command>property-toggle</command>
                <property>/instrumentation/alt-btn</property>
            </binding>
            <mod-up>
                <binding>
                    <command>property-toggle</command>
                    <property>/instrumentation/alt-btn</property>
                </binding>
            </mod-up>
        </action>
        <hovered>
            <binding>
                <command>set-tooltip</command>
                <tooltip-id>kap140-alt-btn</tooltip-id>
                <label>ALT: %s</label>
                <mapping>on-off</mapping>
                <property>autopilot/KAP140/locks/alt-hold</property>
            </binding>
        </hovered>
    </animation>

    <animation>
        <type>translate</type>
        <object-name>alt-btn</object-name>
        <property>/instrumentation/alt-btn</property>
        <factor>-0.004</factor>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>rev-btn</object-name>
        <action>
            <name>REV Button</name>
            <button>0</button>
            <binding>
                <command>nasal</command>
                <script>kap140.revButton();c172p.click("kap140")</script>
            </binding>
            <binding>
                <command>property-toggle</command>
                <property>/instrumentation/rev-btn</property>
            </binding>
            <mod-up>
                <binding>
                    <command>property-toggle</command>
                    <property>/instrumentation/rev-btn</property>
                </binding>
            </mod-up>
        </action>
        <hovered>
            <binding>
                <command>set-tooltip</command>
                <tooltip-id>kap140-rev-btn</tooltip-id>
                <label>REV: %s</label>
                <mapping>on-off</mapping>
                <property>autopilot/KAP140/locks/rev-hold</property>
            </binding>
        </hovered>
    </animation>

    <animation>
        <type>translate</type>
        <object-name>rev-btn</object-name>
        <property>/instrumentation/rev-btn</property>
        <factor>-0.004</factor>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>dn-btn</object-name>
        <action>
            <name>DN Button</name>
            <button>0</button>
            <binding>
                <command>nasal</command>
                <script>kap140.downButton();c172p.click("kap140")</script>
            </binding>
            <binding>
                <command>property-toggle</command>
                <property>/instrumentation/dn-btn</property>
            </binding>
            <mod-up>
                <binding>
                    <command>property-toggle</command>
                    <property>/instrumentation/dn-btn</property>
                </binding>
            </mod-up>
        </action>
        <hovered>
            <binding>
                <command>set-tooltip</command>
                <tooltip-id>kap140-dn-btn</tooltip-id>
                <label>Down</label>
            </binding>
        </hovered>
    </animation>

    <animation>
        <type>translate</type>
        <object-name>dn-btn</object-name>
        <property>/instrumentation/dn-btn</property>
        <factor>-0.004</factor>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>up-btn</object-name>
        <action>
            <name>UP Button</name>
            <button>0</button>
            <binding>
                <command>nasal</command>
                <script>kap140.upButton();c172p.click("kap140")</script>
            </binding>
            <binding>
                <command>property-toggle</command>
                <property>/instrumentation/up-btn</property>
            </binding>
            <mod-up>
                <binding>
                    <command>property-toggle</command>
                    <property>/instrumentation/up-btn</property>
                </binding>
            </mod-up>
        </action>
        <hovered>
            <binding>
                <command>set-tooltip</command>
                <tooltip-id>kap140-up-btn</tooltip-id>
                <label>Up</label>
            </binding>
        </hovered>
    </animation>

    <animation>
        <type>translate</type>
        <object-name>up-btn</object-name>
        <property>/instrumentation/up-btn</property>
        <factor>-0.004</factor>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>arm-btn</object-name>
        <action>
            <name>ARM Button</name>
            <button>0</button>
            <binding>
                <command>nasal</command>
                <script>kap140.armButton();c172p.click("kap140")</script>
            </binding>
            <binding>
                <command>property-toggle</command>
                <property>/instrumentation/arm-btn</property>
            </binding>
            <mod-up>
                <binding>
                    <command>property-toggle</command>
                    <property>/instrumentation/arm-btn</property>
                </binding>
            </mod-up>
        </action>
        <hovered>
            <binding>
                <command>set-tooltip</command>
                <tooltip-id>kap140-arm-btn</tooltip-id>
                <label>ARM</label>
            </binding>
        </hovered>
    </animation>

    <animation>
        <type>translate</type>
        <object-name>arm-btn</object-name>
        <property>/instrumentation/arm-btn</property>
        <factor>-0.004</factor>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>baro-btn</object-name>
        <action>
            <name>BARO Button</name>
            <button>0</button>
            <repeatable type="bool">false</repeatable>
            <binding>
                <command>nasal</command>
                <script>kap140.baroButtonPress();c172p.click("kap140")</script>
            </binding>
            <binding>
                <command>property-toggle</command>
                <property>/instrumentation/baro-btn</property>
            </binding>
            <mod-up>
                <binding>
                    <command>nasal</command>
                    <script>kap140.baroButtonRelease();c172p.click("kap140")</script>
                </binding>
                <binding>
                    <command>property-toggle</command>
                    <property>/instrumentation/baro-btn</property>
                </binding>
            </mod-up>
        </action>
        <hovered>
            <binding>
                <command>set-tooltip</command>
                <tooltip-id>kap140-baro-btn</tooltip-id>
                <label>BARO</label>
            </binding>
        </hovered>
    </animation>

    <animation>
        <type>translate</type>
        <object-name>baro-btn</object-name>
        <property>/instrumentation/baro-btn</property>
        <factor>-0.004</factor>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>knob</type>
        <object-name>knob-inner</object-name>
        <property alias="/params/dial-10-ft"/>
        <factor>-2.5</factor>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
        <center>
            <x-m>-0.34833</x-m>
            <y-m> 0.18003</y-m>
            <z-m>-0.10511</z-m>
        </center>
        <increase>
            <binding>
                <command>nasal</command>
                <script>kap140.knobSmallUp()</script>
            </binding>
        </increase>
        <decrease>
            <binding>
                <command>nasal</command>
                <script>kap140.knobSmallDown()</script>
            </binding>
        </decrease>
        <action>
            <binding>
                <command>property-adjust</command>
                <property alias="/params/dial-10-ft"/>
                <factor>4</factor>
                <min>0</min>
                <max>360</max>
                <wrap>true</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>c172p.click("kap140-dial")</script>
            </binding>
        </action>
        <hovered>
            <binding>
                <command>set-tooltip</command>
                <tooltip-id>ap-knob-inner</tooltip-id>
                <label>Adjust ALT: 20 ft; Baro: 0.01 inHg</label>
            </binding>
        </hovered>
    </animation>

    <animation>
        <type>knob</type>
        <object-name>knob-outer</object-name>
        <property alias="/params/dial-100-ft"/>
        <factor>-2.5</factor>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
        <center>
            <x-m>-0.35227</x-m>
            <y-m> 0.18003</y-m>
            <z-m>-0.10511</z-m>
        </center>
        <increase>
            <binding>
                <command>nasal</command>
                <script>kap140.knobLargeUp()</script>
            </binding>
        </increase>
        <decrease>
            <binding>
                <command>nasal</command>
                <script>kap140.knobLargeDown()</script>
            </binding>
        </decrease>
        <action>
            <binding>
                <command>property-adjust</command>
                <property alias="/params/dial-100-ft"/>
                <factor>4</factor>
                <min>0</min>
                <max>360</max>
                <wrap>true</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>c172p.click("kap140-dial")</script>
            </binding>
        </action>
        <hovered>
            <binding>
                <command>set-tooltip</command>
                <tooltip-id>ap-knob-outer</tooltip-id>
                <label>Adjust ALT: 100 ft; Baro: 1 inHg</label>
            </binding>
        </hovered>
    </animation>

    <animation>
        <type>material</type>
        <object-name>alt-digits</object-name>
        <object-name>annunciators</object-name>
        <object-name>hpa-digits</object-name>
        <object-name>inhg-digits</object-name>
        <object-name>vs-digits</object-name>
        <object-name>vs-digits-minus</object-name>
        <condition>
            <and>
                <not>
                    <property>sim/rendering/rembrandt/enabled</property>
                </not>
                <greater-than>
                    <property>/sim/model/c172p/lighting/ap</property>
                    <value>0.0</value>
                </greater-than>
            </and>
        </condition>
        <emission>
            <red>1.0</red>
            <green>1.0</green>
            <blue>1.0</blue>
            <factor-prop>/sim/model/c172p/lighting/ap</factor-prop>
        </emission>
    </animation>

    <animation>
        <type>material</type>
        <object-name>alt-digits</object-name>
        <object-name>annunciators</object-name>
        <object-name>hpa-digits</object-name>
        <object-name>inhg-digits</object-name>
        <object-name>vs-digits</object-name>
        <object-name>vs-digits-minus</object-name>
        <condition>
            <and>
                <not>
                    <property>sim/rendering/rembrandt/enabled</property>
                </not>
                <equals>
                    <property>/sim/model/c172p/lighting/ap</property>
                    <value>0.0</value>
                </equals>
            </and>
        </condition>
        <emission>
            <red>1.0</red>
            <green>1.0</green>
            <blue>1.0</blue>
        </emission>
    </animation>

</PropertyList>
