<?xml version="1.0" encoding="ISO-8859-1"?>

<PropertyList>

  <path>kt70.ac</path>

  <animation>
    <object-name>fond</object-name>
    <object-name>vfr-btn</object-name>
    <object-name>knob0</object-name>
    <object-name>knob1</object-name>
    <object-name>knob2</object-name>
    <object-name>knob3</object-name>
    <object-name>knob4</object-name>
    <object-name>ident-btn</object-name>
    <object-name>modeselect</object-name>

    <object-name>fl</object-name>
    <object-name>reply</object-name>
    <object-name>alt-dig-1</object-name>
    <object-name>alt-dig-2</object-name>
    <object-name>alt-dig-3</object-name>
    <object-name>on</object-name>
    <object-name>alt</object-name>
    <object-name>sby</object-name>
    <object-name>gnd</object-name>
    <object-name>digit1</object-name>
    <object-name>digit2</object-name>
    <object-name>digit3</object-name>
    <object-name>digit4</object-name>

    <object-name>vitre</object-name>
  </animation>

  <animation>
    <type>noshadow</type>
    <object-name>fond</object-name>
    <object-name>vfr-btn</object-name>
    <object-name>knob0</object-name>
    <object-name>knob1</object-name>
    <object-name>knob2</object-name>
    <object-name>knob3</object-name>
    <object-name>knob4</object-name>
    <object-name>ident-btn</object-name>
    <object-name>modeselect</object-name>
    <object-name>fl</object-name>
    <object-name>reply</object-name>
    <object-name>alt-dig-1</object-name>
    <object-name>alt-dig-2</object-name>
    <object-name>alt-dig-3</object-name>
    <object-name>on</object-name>
    <object-name>alt</object-name>
    <object-name>sby</object-name>
    <object-name>gnd</object-name>
    <object-name>digit1</object-name>
    <object-name>digit2</object-name>
    <object-name>digit3</object-name>
    <object-name>digit4</object-name>
    <object-name>vitre</object-name>
  </animation>

  <!-- working for Compositor -->
  <effect>
    <inherits-from>../../../../Effects/Glass/glass</inherits-from>
    <object-name>vitre</object-name>
  </effect>

  <animation>
    <type>material</type>
    <object-name>knob0</object-name>
    <object-name>knob1</object-name>
    <object-name>knob2</object-name>
    <object-name>knob3</object-name>
    <object-name>knob4</object-name>
    <object-name>vfr-btn</object-name>
    <object-name>ident-btn</object-name>
    <object-name>modeselect</object-name>
    <condition>
      <property>controls/electric/battery-switch</property>
    </condition>
    <emission>
      <factor-prop>controls/lighting/instruments-norm</factor-prop>
      <red>   0.50 </red>
      <green> 0.40 </green>
      <blue>  0.30 </blue>
    </emission>
  </animation>

  <animation>
    <type>material</type>
    <object-name>digit1</object-name>
    <object-name>digit2</object-name>
    <object-name>digit3</object-name>
    <object-name>digit4</object-name>
    <object-name>alt-dig-1</object-name>
    <object-name>alt-dig-2</object-name>
    <object-name>alt-dig-3</object-name>
    <object-name>on</object-name>
    <object-name>alt</object-name>
    <object-name>sby</object-name>
    <object-name>gnd</object-name>
    <object-name>fl</object-name>
    <object-name>reply</object-name>
    <condition>
      <property>controls/electric/battery-switch</property>
    </condition>
    <emission>
      <factor-prop>controls/lighting/instruments-norm</factor-prop>
      <red>   1 </red>
      <green> 1 </green>
      <blue>  1 </blue>
    </emission>
  </animation>

  <animation>
    <name>altitude</name>
    <object-name>alt-dig-1</object-name>
    <object-name>alt-dig-2</object-name>
    <object-name>alt-dig-3</object-name>
  </animation>

  <animation>
    <name>digits</name>
    <object-name>digit1</object-name>
    <object-name>digit2</object-name>
    <object-name>digit3</object-name>
    <object-name>digit4</object-name>
  </animation>

  <animation>
    <type>textranslate</type>
    <object-name>alt-dig-1</object-name>
    <property>instrumentation/altimeter/mode-c-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-dig-2</object-name>
    <property>instrumentation/altimeter/mode-c-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-dig-3</object-name>
    <property>instrumentation/altimeter/mode-c-alt-ft</property>
    <factor>0.001</factor>
    <step>100</step>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!--  Don't display the transponder code unless there is power  -->
  <animation>
    <type>select</type>
    <object-name>digit1</object-name>
    <object-name>digit2</object-name>
    <object-name>digit3</object-name>
    <object-name>digit4</object-name>
    <object-name>fl</object-name>
    <object-name>reply</object-name>
    <object-name>alt-dig-1</object-name>
    <object-name>alt-dig-2</object-name>
    <object-name>alt-dig-3</object-name>
    <object-name>on</object-name>
    <object-name>alt</object-name>
    <object-name>sby</object-name>
    <object-name>gnd</object-name>
    <condition>
      <greater-than>
        <property>systems/electrical/outputs/transponder</property>
        <value>8.0</value>
      </greater-than>
    </condition>
  </animation>

  <animation>
    <type>textranslate</type>
    <object-name>digit1</object-name>
    <property>instrumentation/transponder/id-code</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>digit2</object-name>
    <property>instrumentation/transponder/id-code</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>digit3</object-name>
    <property>instrumentation/transponder/id-code</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>digit4</object-name>
    <property>instrumentation/transponder/id-code</property>
    <factor>0.1</factor>
    <step>1</step>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Annunciators -->
  <animation>
    <type>select</type>
    <object-name>alt</object-name>
    <condition>
      <equals>
        <property>instrumentation/transponder/inputs/mode</property>
        <value>5</value>
      </equals>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>fl</object-name>
    <condition>
      <equals>
        <property>instrumentation/transponder/inputs/mode</property>
        <value>5</value>
      </equals>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>gnd</object-name>
    <condition>
      <equals>
        <property>instrumentation/transponder/inputs/mode</property>
        <value>3</value>
      </equals>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>on</object-name>
    <condition>
      <greater-than>
        <property>instrumentation/transponder/inputs/mode</property>
        <value>3</value>
      </greater-than>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>reply</object-name>
    <condition>
      <property>instrumentation/kt-70/annunciators/reply</property>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>sby</object-name>
    <condition>
      <equals>
        <property>instrumentation/transponder/inputs/mode</property>
        <value>1</value>
      </equals>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>digits</object-name>
    <condition>
      <greater-than>
        <property>instrumentation/transponder/inputs/mode</property>
        <value>1</value>
      </greater-than>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>altitude</object-name>
    <condition>
      <equals>
        <property>instrumentation/transponder/inputs/mode</property>
        <value>5</value>
      </equals>
    </condition>
  </animation>

  <!-- Controls -->
  <animation>
    <type>pick</type>
    <object-name>modeselect</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <button>3</button>
      <repeatable>true</repeatable>
      <interval-sec>1</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/transponder/inputs/mode</property>
        <step>1</step>
        <min>0</min>
        <max>5</max>
        <wrap>false</wrap>
      </binding>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/transponder/inputs/knob-mode</property>
        <step>1</step>
        <min>0</min>
        <max>5</max>
        <wrap>false</wrap>
      </binding>
    </action>
    <action>
      <button>1</button>
      <button>4</button>
      <repeatable>true</repeatable>
      <interval-sec>1</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/transponder/inputs/mode</property>
        <step>-1</step>
        <min>0</min>
        <max>5</max>
        <wrap>false</wrap>
      </binding>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/transponder/inputs/knob-mode</property>
        <step>-1</step>
        <min>0</min>
        <max>5</max>
        <wrap>false</wrap>
      </binding>
    </action>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>kt70-func</tooltip-id>
        <label>Transponder: %s</label>
        <property>instrumentation/transponder/inputs/knob-mode</property>
        <mapping>nasal</mapping>
        <script>
          var modes = ['OFF', 'STBY', 'TEST', 'GND', 'ON', 'ALT'];
          return modes[arg[0]];
        </script>
      </binding>
    </hovered>
  </animation>


  <animation>
    <type>rotate</type>
    <object-name>modeselect</object-name>
    <property>instrumentation/transponder/inputs/mode</property>
    <factor>33</factor>
    <offset-deg>-90</offset-deg>
    <center>
      <x-m> 0</x-m>
      <y-m> 0.0622</y-m>
      <z-m> 0.0053</z-m>
    </center>
    <axis>
      <x>-1</x>
      <y>0</y>
      <z>0</z>
    </axis>
  </animation>

  <!-- Numbers -->
  <animation>
    <type>pick</type>
    <object-name>knob4</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <button>3</button>
      <repeatable>true</repeatable>
      <interval-sec>0.5</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/transponder/inputs/digit[0]</property>
        <step>1</step>
        <min>0</min>
        <max>8</max>
        <wrap>true</wrap>
      </binding>
    </action>
    <action>
      <button>1</button>
      <button>4</button>
      <repeatable>true</repeatable>
      <interval-sec>0.5</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/transponder/inputs/digit[0]</property>
        <step>-1</step>
        <min>0</min>
        <max>8</max>
        <wrap>true</wrap>
      </binding>
    </action>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>xpdr0</tooltip-id>
        <label>Digit 4: %1.0f</label>
        <property>instrumentation/transponder/inputs/digit[0]</property>
      </binding>
    </hovered>
  </animation>

  <!-- Number3 -->
  <animation>
    <type>pick</type>
    <object-name>knob3</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <button>3</button>
      <repeatable>true</repeatable>
      <interval-sec>0.5</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/transponder/inputs/digit[1]</property>
        <step>1</step>
        <min>0</min>
        <max>8</max>
        <wrap>true</wrap>
      </binding>
    </action>
    <action>
      <button>1</button>
      <button>4</button>
      <repeatable>true</repeatable>
      <interval-sec>0.5</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/transponder/inputs/digit[1]</property>
        <step>-1</step>
        <min>0</min>
        <max>8</max>
        <wrap>true</wrap>
      </binding>
    </action>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>xpdr1</tooltip-id>
        <label>Digit 3: %1.0f</label>
        <property>instrumentation/transponder/inputs/digit[1]</property>
      </binding>
    </hovered>
  </animation>

  <!-- Number2 -->
  <animation>
    <type>pick</type>
    <object-name>knob2</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <button>3</button>
      <repeatable>true</repeatable>
      <interval-sec>0.5</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/transponder/inputs/digit[2]</property>
        <step>1</step>
        <min>0</min>
        <max>8</max>
        <wrap>true</wrap>
      </binding>
    </action>
    <action>
      <button>1</button>
      <button>4</button>
      <repeatable>true</repeatable>
      <interval-sec>0.5</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/transponder/inputs/digit[2]</property>
        <step>-1</step>
        <min>0</min>
        <max>8</max>
        <wrap>true</wrap>
      </binding>
    </action>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>xpdr2</tooltip-id>
        <label>Digit 2: %1.0f</label>
        <property>instrumentation/transponder/inputs/digit[2]</property>
      </binding>
    </hovered>
  </animation>

  <!-- Number1 -->
  <animation>
    <type>pick</type>
    <object-name>knob1</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <button>3</button>
      <repeatable>true</repeatable>
      <interval-sec>0.5</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/transponder/inputs/digit[3]</property>
        <step>1</step>
        <min>0</min>
        <max>8</max>
        <wrap>true</wrap>
      </binding>
    </action>
    <action>
      <button>1</button>
      <button>4</button>
      <repeatable>true</repeatable>
      <interval-sec>0.5</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/transponder/inputs/digit[3]</property>
        <step>-1</step>
        <min>0</min>
        <max>8</max>
        <wrap>true</wrap>
      </binding>
    </action>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>xpdr3</tooltip-id>
        <label>Digit 1: %1.0f</label>
        <property>instrumentation/transponder/inputs/digit[3]</property>
      </binding>
    </hovered>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ident-btn</object-name>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-assign</command>
        <property>instrumentation/transponder/inputs/ident-btn</property>
        <value>true</value>
      </binding>
      <mod-up>
        <binding>
          <command>property-assign</command>
          <property>instrumentation/transponder/inputs/ident-btn</property>
          <value>false</value>
        </binding>
      </mod-up>
    </action>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>ident</tooltip-id>
        <label>Ident: %s</label>
        <mapping>on-off</mapping>
        <property>instrumentation/transponder/inputs/ident-btn</property>
      </binding>
    </hovered>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>vfr-btn</object-name>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-assign</command>
        <property>instrumentation/transponder/id-code</property>
        <value>1200</value>
      </binding>
    </action>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>vfrbutt</tooltip-id>
        <label>Set 1200</label>
      </binding>
    </hovered>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>fond</object-name>
    <action></action>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>xpdr</tooltip-id>
        <label>%s</label>
        <property>instrumentation/transponder/inputs/knob-mode</property>
        <mapping>nasal</mapping>
        <script>
          var modes = ['OFF', 'STBY', 'TEST', 'GND', 'ON', 'ALT'];
          var code = getprop("/instrumentation/transponder/id-code");
          return "Code: " ~ code ~ " Mode: " ~ modes[arg[0]];
        </script>
      </binding>
    </hovered>
  </animation>

  <!-- Label Text -->
  <text>
    <name>LabelText</name>
    <type type="string">literal</type>
    <text type="string">Tansponder</text>
    <draw-text type="bool">true</draw-text>
    <font>Helvetica.txf</font>
    <character-size type="double">0.020</character-size>
    <character-aspect-ratio type="double">1.0</character-aspect-ratio>
    <axis-alignment>yz-plane</axis-alignment>
    <max-height>0.2</max-height>
    <max-width>0.2</max-width>
    <font-resolution>
      <width type="int">32</width>
      <height type="int">32</height>
    </font-resolution>
    <alignment>center-center</alignment>
    <offsets>
      <x-m> 0.02</x-m>
      <y-m> -0.01 </y-m>
      <z-m> 0.01 </z-m>
    </offsets>
  </text>

  <animation>
    <type>material</type>
    <object-name>LabelText</object-name>
    <emission>
      <red>   0.7 </red>
      <green> 0.7 </green>
      <blue>  0.7 </blue>
    </emission>
  </animation>

  <animation>
    <type>select</type>
    <object-name>LabelText</object-name>
    <condition>
      <property>/sim/panel-hotspots</property>
    </condition>
  </animation>

</PropertyList>
