<?xml version="1.0" ?>
<!--
 This file is part of FlightGear, the free flight simulator
 http://www.flightgear.org/

 Copyright (C) 2009 Torsten Dreyer, Torsten (at) t3r _dot_ de

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as
 published by the Free Software Foundation; either version 2 of the
 License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 General Public License for more details.
-->
<!--
    Maintainer: Torsten Dreyer
-->
<PropertyList>
    <params>
        <power-btn>instrumentation/dme[0]/power-btn</power-btn>
        <serviceable>instrumentation/dme[0]/serviceable</serviceable>
    </params>

    <path>Aircraft/SenecaII/Models/dme.ac</path>

    <model>
      <path>Aircraft/Instruments-3d/ki266/ki266.xml</path>
      <name>ki266</name>
      <offsets>
        <x-m>0.00140005</x-m>
        <y-m>0.0274714</y-m>
        <z-m>0.0</z-m>
      </offsets>
    </model>

    <!-- the power switch -->
    <animation>
        <type>rotate</type>
        <object-name>PowerSwitch.Lever</object-name>
        <property alias="../../params/power-btn"/>
        <factor>-60</factor>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <center>
            <x-m>0.000862624</x-m>
            <y-m>-0.0328855</y-m>
            <z-m>0</z-m>
        </center>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>on</object-name>
        <visible>true</visible>
        <action>
          <button>0</button>
          <repeatable>false</repeatable>
          <binding>
            <command>property-assign</command>
            <property alias="../../../../params/power-btn"/>
            <value>1</value>
          </binding>
        </action>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>off</object-name>
        <visible>true</visible>
        <action>
          <button>0</button>
          <repeatable>false</repeatable>
          <binding>
            <command>property-assign</command>
            <property alias="../../../../params/power-btn"/>
            <value>0</value>
          </binding>
        </action>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>PowerSwitch</object-name>
        <visible>true</visible>
        <action>
          <button>0</button>
          <repeatable>false</repeatable>
          <binding>
            <command>property-toggle</command>
            <property alias="../../../../params/power-btn"/>
          </binding>
        </action>
    </animation>

    <!-- the source switch -->
    <animation>
        <type>rotate</type>
        <object-name>SourceSelectorKnob</object-name>
        <property>instrumentation/dme/switch-position</property>
        <factor>-30</factor>
        <min-deg>-60</min-deg>
        <max-deg>0</max-deg>
        <offset-deg>30</offset-deg>
        <axis>
            <x>1</x>
            <y>0</y>
            <z>0</z>
        </axis>
        <center>
            <x-m>0.005</x-m>
            <y-m>-0.0589436</y-m>
            <z-m>0</z-m>
        </center>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>SourceSelectorPick.R</object-name>
        <visible>false</visible>
        <action>
          <button>0</button>
          <repeatable>false</repeatable>
          <binding>
              <command>property-adjust</command>
              <property>instrumentation/dme/switch-position</property>
              <step>1</step>
              <min>1</min>
              <max>3</max>
              <wrap>0</wrap>
          </binding>
        </action>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>SourceSelectorPick.L</object-name>
        <visible>false</visible>
        <action>
          <button>0</button>
          <repeatable>false</repeatable>
          <binding>
              <command>property-adjust</command>
              <property>instrumentation/dme/switch-position</property>
              <step>-1</step>
              <min>1</min>
              <max>3</max>
              <wrap>0</wrap>
          </binding>
        </action>
    </animation>

</PropertyList>
