<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- #############################################################################
#    (C) 2007 by Yurik V. Nikiforoff - port for FGFS,  FDM,                 #
# 2d & 3d instruments, animations, systems and over.                        #
#     yurik@megasignal.com                                                  #
#############################################################################
ARK-15 (ADF) control gauge
3D instrument for Tu-154

updated by BARANGER Emmanuel May   2015
updated by BARANGER Emmanuel April 2023
-->
<PropertyList>

  <path>ark-15.ac</path>

  <animation>
    <object-name>base</object-name>
    <object-name>digit_1_1</object-name>
    <object-name>digit_1_2</object-name>
    <object-name>digit_1_3</object-name>
    <object-name>digit_2_1</object-name>
    <object-name>digit_2_2</object-name>
    <object-name>digit_2_3</object-name>
    <object-name>handle</object-name>
    <object-name>base_switch</object-name>
    <object-name>lamp_1</object-name>
    <object-name>lamp_2</object-name>
    <object-name>hs_1</object-name>
    <object-name>hs_2</object-name>
    <object-name>hs_1_1</object-name>
    <object-name>hs_1_2</object-name>
    <object-name>hs_1_3</object-name>
    <object-name>hs_1_4</object-name>
    <object-name>hs_1_5</object-name>
    <object-name>hs_1_6</object-name>
    <object-name>hs_2_1</object-name>
    <object-name>hs_2_2</object-name>
    <object-name>hs_2_3</object-name>
    <object-name>hs_2_4</object-name>
    <object-name>hs_2_5</object-name>
    <object-name>hs_2_6</object-name>
    <object-name>hs_3</object-name>
    <object-name>_c_1</object-name>
    <object-name>_d_1</object-name>
    <object-name>_d_2</object-name>
    <object-name>knobL</object-name>
    <object-name>knobR</object-name>
  </animation>

  <animation>
    <type>noshadow</type>
    <object-name>base</object-name>
    <object-name>digit_1_1</object-name>
    <object-name>digit_1_2</object-name>
    <object-name>digit_1_3</object-name>
    <object-name>digit_2_1</object-name>
    <object-name>digit_2_2</object-name>
    <object-name>digit_2_3</object-name>
    <object-name>handle</object-name>
    <object-name>base_switch</object-name>
    <object-name>lamp_1</object-name>
    <object-name>lamp_2</object-name>
    <object-name>hs_1</object-name>
    <object-name>hs_2</object-name>
    <object-name>_c_1</object-name>
    <object-name>_d_1</object-name>
    <object-name>_d_2</object-name>
  </animation>

  <animation>
    <name>digits</name>
    <object-name>digit_1_1</object-name>
    <object-name>digit_1_2</object-name>
    <object-name>digit_1_3</object-name>
    <object-name>digit_2_1</object-name>
    <object-name>digit_2_2</object-name>
    <object-name>digit_2_3</object-name>
  </animation>

  <!--External panel lighting-->
  <animation>
    <type>material</type>
    <object-name>_c_1</object-name>
    <object-name>_c_2</object-name>
    <object-name>digits</object-name>
    <condition>
      <property>controls/electric/battery-switch</property>
    </condition>
    <emission>
      <factor-prop>controls/lighting/luminosite-lights</factor-prop>
      <red>   0.50 </red>
      <green> 0.40 </green>
      <blue>  0.30 </blue>
    </emission>
  </animation>

  <!--Brightness-->
  <animation>
    <type>material</type>
    <object-name>_d_2</object-name>
    <object-name>lamp_1</object-name>
    <object-name>lamp_2</object-name>
    <condition>
      <property>controls/electric/battery-switch</property>
    </condition>
    <emission>
      <red>   2 </red>
      <green> 2 </green>
      <blue>  2 </blue>
    </emission>
  </animation>

  <!--Failure lamps-->
  <animation>
    <type>select</type>
    <object-name>lamp_1</object-name>
    <condition>
      <not><property>controls/switches/adf-1-selector</property></not>
      <property>instrumentation/adf[0]/serviceable</property>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>lamp_2</object-name>
    <condition>
      <property>controls/switches/adf-1-selector</property>
      <property>instrumentation/adf[0]/serviceable</property>
    </condition>
  </animation>

  <!--operate/standby selector-->
  <animation>
    <type>rotate</type>
    <object-name>handle</object-name>
    <property>controls/switches/adf-1-selector</property>
    <interpolation>
      <entry><ind> 0 </ind> <dep>  60 </dep></entry>
      <entry><ind> 1 </ind> <dep> -60 </dep></entry>
    </interpolation>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z>-1 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>digit_1_3</object-name>
    <property>instrumentation/ark-15[0]/digit-1-3</property>
    <factor> 21.1765 </factor>
    <center>
      <x-m> -0.04073 </x-m>
      <y-m> -0.04590 </y-m>
      <z-m>  0.00000 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y>  0 </y>
      <z> -1 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>digit_1_2</object-name>
    <property>instrumentation/ark-15[0]/digit-1-2</property>
    <factor> 21.1765 </factor>
    <center>
      <x-m> -0.04073 </x-m>
      <y-m> -0.04590 </y-m>
      <z-m>  0.00000 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y>  0 </y>
      <z> -1 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>digit_1_1</object-name>
    <property>instrumentation/ark-15[0]/digit-1-1</property>
    <factor> 21.1765 </factor>
    <center>
      <x-m> -0.04073 </x-m>
      <y-m> -0.04590 </y-m>
      <z-m>  0.00000 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y>  0 </y>
      <z> -1 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>digit_2_3</object-name>
    <property>instrumentation/ark-15[0]/digit-2-3</property>
    <factor> 21.1765 </factor>
    <center>
      <x-m> -0.04073 </x-m>
      <y-m>  0.05472 </y-m>
      <z-m>  0.00000 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y>  0 </y>
      <z> -1 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>digit_2_2</object-name>
    <property>instrumentation/ark-15[0]/digit-2-2</property>
    <factor> 21.1765 </factor>
    <center>
      <x-m> -0.04073 </x-m>
      <y-m>  0.05472 </y-m>
      <z-m>  0.00000 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y>  0 </y>
      <z> -1 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>digit_2_1</object-name>
    <property>instrumentation/ark-15[0]/digit-2-1</property>
    <factor> 21.1765 </factor>
    <center>
      <x-m> -0.04073 </x-m>
      <y-m>  0.05472 </y-m>
      <z-m>  0.00000 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y>  0 </y>
      <z> -1 </z>
    </axis>
  </animation>

  <!--Set-->
  <animation>
    <type>select</type>
    <object-name>_d_2</object-name>
    <condition>
      <equals>
        <property>/instrumentation/adf[0]/in-range</property>
        <value>0</value>
      </equals>
    </condition>
  </animation>

  <!--Controls-->
  <animation>
    <type>pick</type>
    <object-name>hs_1</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>
          interpolate("controls/switches/adf-1-selector", 0.0, 0.1 );
        </script>
      </binding>
    </action>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>ADF-Ident1</tooltip-id>
        <label>Ident: %s</label>
        <property>instrumentation/adf[0]/ident</property>
      </binding>
    </hovered>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_2</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>
          interpolate("controls/switches/adf-1-selector", 1.0, 0.1 );
        </script>
      </binding>
    </action>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>ADF-Ident1</tooltip-id>
        <label>Ident: %s</label>
        <property>instrumentation/adf[0]/ident</property>
      </binding>
    </hovered>
  </animation>

  <!--Left half-->
  <animation>
    <type>pick</type>
    <object-name>hs_1_1</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-1-3</property>
        <step>-1.0</step>
        <min>0.0</min>
        <max>16.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_1_2</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-1-3</property>
        <step>1.0</step>
        <min>0.0</min>
        <max>16.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_1_3</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-1-2</property>
        <step>-1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_1_4</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-1-2</property>
        <step>1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_1_5</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-1-1</property>
        <step>-1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_1_6</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-1-1</property>
        <step>1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <!--Right half-->
  <animation>
    <type>pick</type>
    <object-name>hs_2_1</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-2-3</property>
        <step>-1.0</step>
        <min>0.0</min>
        <max>16.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_2_2</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-2-3</property>
        <step>1.0</step>
        <min>0.0</min>
        <max>16.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_2_3</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-2-2</property>
        <step>-1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_2_4</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-2-2</property>
        <step>1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_2_5</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-2-1</property>
        <step>-1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_2_6</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-2-1</property>
        <step>1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <!--Mouse wheel-->
  <!--Left-->
  <animation>
    <type>pick</type>
    <object-name>hs_1_1</object-name>
    <object-name>hs_1_2</object-name>
    <visible>true</visible>
    <action>
      <button>3</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-1-3</property>
        <step>-1.0</step>
        <min>0.0</min>
        <max>16.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
    <action>
      <button>4</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-1-3</property>
        <step>1.0</step>
        <min>0.0</min>
        <max>16.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_1_3</object-name>
    <object-name>hs_1_4</object-name>
    <visible>true</visible>
    <action>
      <button>3</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-1-2</property>
        <step>-1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
    <action>
      <button>4</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-1-2</property>
        <step>1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_1_5</object-name>
    <object-name>hs_1_6</object-name>
    <visible>true</visible>
    <action>
      <button>3</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-1-1</property>
        <step>-1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
    <action>
      <button>4</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-1-1</property>
        <step>1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <!--Right half-->
  <animation>
    <type>pick</type>
    <object-name>hs_2_1</object-name>
    <object-name>hs_2_2</object-name>
    <visible>true</visible>
    <action>
      <button>3</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-2-3</property>
        <step>-1.0</step>
        <min>0.0</min>
        <max>16.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
    <action>
      <button>4</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-2-3</property>
        <step>1.0</step>
        <min>0.0</min>
        <max>16.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_2_3</object-name>
    <object-name>hs_2_4</object-name>
    <visible>true</visible>
    <action>
      <button>3</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-2-2</property>
        <step>-1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
    <action>
      <button>4</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-2-2</property>
        <step>1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>hs_2_5</object-name>
    <object-name>hs_2_6</object-name>
    <visible>true</visible>
    <action>
      <button>3</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-2-1</property>
        <step>-1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
    <action>
      <button>4</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/ark-15[0]/digit-2-1</property>
        <step>1.0</step>
        <min>0.0</min>
        <max>9.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
  </animation>

  <!--Sound-->
  <animation>
    <type>pick</type>
    <object-name>hs_3</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <button>3</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/adf[0]/volume</property>
        <step>-0.2</step>
        <min>0.0</min>
        <max>1.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
    <action>
      <button>1</button>
      <button>4</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/adf[0]/volume</property>
        <step>0.2</step>
        <min>0.0</min>
        <max>1.0</max>
        <wrap>false</wrap>
      </binding>
    </action>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>ADF-volume1</tooltip-id>
        <label>Volume: %d%%</label>
        <property>instrumentation/adf[0]/volume</property>
        <mapping>nasal</mapping>
        <script>return int(arg[0] * 100)</script>
      </binding>
    </hovered>
  </animation>

</PropertyList>
