<?xml version="1.0" ?> 
<PropertyList> 
    <path>flaps.ac</path>
	
    <params>
        <flaps-lever>/sim/model/c152/cockpit/flaps-lever</flaps-lever>
    </params>

    <animation>
        <type>rotate</type>
        <property>surface-positions/flap-pos-norm</property>
        <object-name>FlapPos</object-name>
        <axis>
            <x>0.0</x>
            <y>1.0</y>
            <z>0.0</z>
        </axis>
      <center>
        <x-m>-0.39</x-m>
        <y-m>0.0</y-m>
        <z-m>0.0</z-m>
      </center>

        <interpolation>
            <entry>
                <ind>0</ind>
                <dep>0</dep>
            </entry>
            <entry>
                <ind>0.333333</ind>
                <dep>3</dep>
            </entry>
            <entry>
                <ind>0.666666</ind>
                <dep>5.8</dep>
            </entry>
            <entry>
                <ind>1.0</ind>
                <dep>8.6</dep>
            </entry>
        </interpolation> 
    </animation> 

    <animation>
        <type>slider</type>
        <drag-direction>vertical</drag-direction>
        <drag-scale-px>30</drag-scale-px>
        <property alias="/params/flaps-lever"/>
        <object-name>FlapSwitch</object-name>
        <axis>
            <x>0.0</x>
            <y>0.0</y>
            <z>-1.0</z>
        </axis>
        <interpolation>
            <entry>
                <ind>0.0</ind>
                <dep>-0.01</dep>
            </entry>
            <entry>
                <ind>0.333333</ind>
                <dep>0.038</dep>
            </entry>
            <entry>
                <ind>0.666666</ind>
                <dep>0.073</dep>
            </entry>
            <entry>
                <ind>1.0</ind>
                <dep>0.092</dep>
            </entry>
        </interpolation> 

        <!-- Flaps moving down -->
        <decrease>
            <binding>
                <command>nasal</command>
                <script>controls.flapsDown(1);</script>
            </binding>
        </decrease>

        <!-- Flaps moving up -->
        <increase>
            <binding>
                <command>nasal</command>
                <script>controls.flapsDown(-1);</script>
            </binding>
        </increase>

        <hovered>
            <binding>
                <command>set-tooltip</command>
                <tooltip-id>flaps-switch</tooltip-id>
                <label>Flaps: %s</label>
                <property>/sim/model/c152/cockpit/flaps-lever</property>
                <mapping>nasal</mapping>
                <script>
                    var f = getprop("/sim/model/c152/cockpit/flaps-lever");
                    if ( f == 0.3333332 ) return '10°';
                    if ( f == 0.3333334 ) return '10°';
                    if ( f == 0.6666666 ) return '20°';
                    if ( f == 0.6666668 ) return '20°';
                    if ( f == 1.00 ) return 'Full';
                    return 'Up';
                </script>
            </binding>
        </hovered>

    </animation>

</PropertyList>
