<?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.
-->
<!--
  $Id: gma340.xml,v 1.6 2010/03/18 07:47:41 torsten Exp $ 
  Garmin GMA 340 Audio Panel 3d model
   Texture image is (c) Garmin (www.garmin.com)
    
   Maintainer: Torsten Dreyer ( Torsten at t3r dot de)
    
-->
<PropertyList>
  <path>gma340.ac</path>

  <animation>
    <type>noshadow</type>
  </animation>

  <animation>
    <type>range</type>
    <min-m>0</min-m>
    <max-m>10</max-m>
  </animation>

  <animation>
    <type>material</type>
    <object-name>gma340.Chassis</object-name>
    <condition>
      <not><property>/sim/rendering/rembrandt/enabled</property></not>
    </condition>
    <emission>
      <red>   0.017 </red>
      <green> 0.017 </green>
      <blue>  0.017 </blue>
      <factor-prop>systems/electrical/outputs/instrument-lights</factor-prop>
    </emission>
  </animation>

  <animation>
    <type>material</type>
    <object-name>gma340.Marker.O</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/marker-beacon/outer</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>material</type>
    <object-name>gma340.Marker.M</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/marker-beacon/middle</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>material</type>
    <object-name>gma340.Marker.I</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/marker-beacon/inner</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.adf</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>instrumentation/adf[0]/ident-audible</property>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.adf</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/adf[0]/ident-audible</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.dme</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>instrumentation/dme[0]/ident</property>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.dme</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/dme[0]/ident</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.nav2</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>instrumentation/nav[1]/ident</property>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.nav2</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/nav[1]/ident</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.nav1</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>/instrumentation/nav[0]/ident</property>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.nav1</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/nav[0]/ident</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.mkr</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>/instrumentation/marker-beacon/audio-btn</property>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.mkr</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/marker-beacon/audio-btn</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.com1</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>/instrumentation/audio-panel/com[0]</property>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.com1</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/audio-panel/com[0]</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.com2</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>/instrumentation/audio-panel/com[1]</property>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.com2</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/audio-panel/com[1]</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.com3</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>/instrumentation/audio-panel/com[2]</property>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.com3</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/audio-panel/com[2]</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.com1mic</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com-mic[0]</property>
        <value>1</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com-mic[1]</property>
        <value>0</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com-mic[2]</property>
        <value>0</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com[0]</property>
        <value>1</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com[1]</property>
        <value>0</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com[2]</property>
        <value>0</value>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.com1mic</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/audio-panel/com-mic[0]</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.com2mic</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com-mic[0]</property>
        <value>0</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com-mic[1]</property>
        <value>1</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com-mic[2]</property>
        <value>0</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com[0]</property>
        <value>0</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com[1]</property>
        <value>1</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com[2]</property>
        <value>0</value>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.com2mic</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/audio-panel/com-mic[1]</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.com3mic</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com-mic[0]</property>
        <value>0</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com-mic[1]</property>
        <value>0</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com-mic[2]</property>
        <value>1</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com[0]</property>
        <value>0</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com[1]</property>
        <value>0</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/com[2]</property>
        <value>1</value>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.com3mic</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/audio-panel/com-mic[2]</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.sens</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>/instrumentation/audio-panel/hi</property>
      </binding>
      <binding>
        <command>property-toggle</command>
        <property>/instrumentation/audio-panel/lo</property>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.hi</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/audio-panel/hi</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>material</type>
    <object-name>gma340.led.lo</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/audio-panel/lo</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.com1_2</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>/instrumentation/audio-panel/com1-2</property>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.com1_2</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/audio-panel/com1-2</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.spkr</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>/instrumentation/audio-panel/spkr</property>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.spkr</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/audio-panel/spkr</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.pa</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>/instrumentation/audio-panel/pa</property>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.pa</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/audio-panel/pa</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.crew</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>/instrumentation/audio-panel/crew</property>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.crew</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/audio-panel/crew</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.pilot</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>/instrumentation/audio-panel/pilot</property>
      </binding>
    </action>
  </animation>
  <animation>
    <type>material</type>
    <object-name>gma340.led.pilot</object-name>
    <condition>
      <property>/instrumentation/audio-panel/serviceable</property>
      <or>
        <property>/instrumentation/audio-panel/pilot</property>
        <property>/instrumentation/audio-panel/test</property>
      </or>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>gma340.pick.test</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-assign</command>
        <property>/instrumentation/audio-panel/test</property>
        <value>1</value>
      </binding>
      <mod-up>
        <binding>
          <command>property-assign</command>
          <property>/instrumentation/audio-panel/test</property>
          <value>0</value>
        </binding>
      </mod-up>
    </action>
  </animation>
</PropertyList>
