<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- ###################################################################################
     Lake of Constance Hangar :: M.Kraus
     Septemper 2013
     This file is licenced under the terms of the GNU General Public Licence V2 or later
     ###################################################################################
     simplyfied by HerbyW Jan2015
     updated by Emmanuel BARANGER may 2015
-->
<PropertyList>
  
  <path>ap-fg.ac</path>
  
  <animation>
    <object-name>bg</object-name>
    <object-name>altOn</object-name>
    <object-name>apOn</object-name>
    <object-name>apprOn</object-name>
    <object-name>hdgOn</object-name>
    <object-name>iasOn</object-name>
    <object-name>navOn</object-name>
    <object-name>apprOn</object-name>
    <object-name>gpsOn</object-name>
    <object-name>pitchOn</object-name>
    <object-name>altOff</object-name>
    <object-name>apOff</object-name>
    <object-name>apprOff</object-name>
    <object-name>hdgOff</object-name>
    <object-name>iasOff</object-name>
    <object-name>navOff</object-name>        
    <object-name>gpsOff</object-name>
    <object-name>pitchOff</object-name>
  </animation>
  
  <animation>
    <type>material</type>
    <object-name>bg</object-name>
    <emission>
      <factor-prop>controls/switches/gauge-light</factor-prop>
      <red>   0.50 </red>
      <green> 0.25 </green>
      <blue>  0.25 </blue>
    </emission>
  </animation>
  
  <animation>
    <type>material</type>
    <object-name>altOn</object-name>
    <object-name>apOn</object-name>
    <object-name>apprOn</object-name>
    <object-name>hdgOn</object-name>
    <object-name>iasOn</object-name>
    <object-name>navOn</object-name>
    <object-name>apprOn</object-name>
    <object-name>gpsOn</object-name>
    <object-name>pitchOn</object-name>
    <object-name>altOff</object-name>
    <object-name>apOff</object-name>
    <object-name>apprOff</object-name>
    <object-name>hdgOff</object-name>
    <object-name>iasOff</object-name>
    <object-name>navOff</object-name>        
    <object-name>gpsOff</object-name>
    <object-name>pitchOff</object-name>
    <emission>
      <factor-prop>controls/switches/gauge-light</factor-prop>
      <red>   0.6 </red>
      <green> 0.6 </green>
      <blue>  0.6 </blue>
    </emission>
  </animation>
  
  <animation>
    <type>select</type>
    <object-name>altOn</object-name>
    <object-name>apOn</object-name>
    <object-name>apprOn</object-name>
    <object-name>hdgOn</object-name>
    <object-name>iasOn</object-name>
    <object-name>navOn</object-name>        
    <object-name>gpsOn</object-name>
    <object-name>pitchOn</object-name>
    <condition>
      <greater-than>
        <property>controls/switches/gauge-light</property>
        <value>0.5</value>
      </greater-than>
    </condition>
  </animation>
  
  <!--################  buttons on the ap-console #################### -->
  <!-- Main Switch AP -->
  <animation>
    <type>select</type>
    <object-name>apOff</object-name>
    <condition>
      <and>
        <equals>
          <property>/autopilot/locks/altitude</property>
          <value type="string"></value>
        </equals>
        <equals>
          <property>/autopilot/locks/heading</property>
          <value type="string"></value>
        </equals>
        <equals>
          <property>/autopilot/locks/speed</property>
          <value type="string"></value>
        </equals> 
      </and>
    </condition>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>apOn</object-name>
    <action>
      <button>0</button>
      <binding> 
        <command>property-assign</command>
        <property>/autopilot/locks/heading</property>
        <value type="string"></value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/altitude</property>
        <value type="string"></value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/speed</property>
        <value type="string"></value>
      </binding>     
    </action>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>apOff</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/heading</property>
        <value type="string">wing-leveler</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/internal/target-roll-deg</property>
        <value type="double"> 0 </value>
      </binding>
    </action>
  </animation>
  
  <!-- Heading Hold -->
  <animation>
    <type>select</type>
    <object-name>hdgOff</object-name>
    <condition>         
      <not>
        <equals>
          <property>/autopilot/locks/heading</property>
          <value type="string">dg-heading-hold</value>
        </equals>
      </not>
    </condition>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>hdgOff</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/heading</property>
        <value type="string">dg-heading-hold</value>
      </binding>            
    </action>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>hdgOn</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/heading</property>
        <value type="string">wing-leveler</value>
      </binding>
    </action>
  </animation>
  
  <!-- Altitude Hold -->
  <animation>
    <type>select</type>
    <object-name>altOff</object-name>
    <condition>
      <not>
        <equals>
          <property>/autopilot/locks/altitude</property>
          <value type="string">altitude-hold</value>
        </equals>
      </not>
    </condition>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>altOff</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/altitude</property>
        <value type="string">altitude-hold</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/settings/target-altitude-ft</property>
        <property>/position/altitude-ft</property>
      </binding>   
    </action>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>altOn</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/altitude</property>
        <value type="string"></value>
      </binding>            
    </action>
  </animation>
  
  <!-- IAS Hold -->
  <animation>
    <type>select</type>
    <object-name>iasOff</object-name>
    <condition>
      <not>
        <equals>
          <property>/autopilot/locks/speed</property>
          <value type="string">speed-with-throttle</value>
        </equals>
      </not>           
    </condition>
  </animation>    
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>iasOff</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/speed</property>
        <value type="string">speed-with-throttle</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/settings/target-speed-kt</property>
        <property>/velocities/airspeed-kt</property>
      </binding> 
    </action>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>iasOn</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/speed</property>
        <value type="string"></value>
      </binding>            
    </action>
  </animation>
  
  <!-- GPS follow -->
  <animation>
    <type>select</type>
    <object-name>gpsOff</object-name>
    <condition>
      <not>
        <equals>
          <property>/autopilot/locks/heading</property>
          <value type="string">true-heading-hold</value>
        </equals>
      </not>
    </condition>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>gpsOff</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/heading</property>
        <value type="string">true-heading-hold</value>
      </binding>
    </action>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>gpsOn</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/heading</property>
        <value type="string"></value>
      </binding>            
    </action>
  </animation>
  
  <!-- Vertical Speed Hold -->
  <animation>
    <type>select</type>
    <object-name>pitchOff</object-name>
    <condition>         
      <not>
        <equals>
          <property>/autopilot/locks/altitude</property>
          <value type="string">vertical-speed-hold</value>
        </equals>
      </not>
    </condition>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>pitchOff</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/altitude</property>
        <value type="string">vertical-speed-hold</value>
      </binding>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/settings/vertical-speed-fpm</property>
        <property>/autopilot/internal/vert-speed-fpm</property>
      </binding>
    </action>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>pitchOn</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/altitude</property>
        <value type="string"></value>
      </binding>            
    </action>
  </animation>
  
  <!-- NAV1 Hold -->
  <animation>
    <type>select</type>
    <object-name>navOff</object-name>
    <condition>
      <not>
        <equals>
          <property>/autopilot/locks/heading</property>
          <value type="string">nav1-hold</value>
        </equals>
      </not>
    </condition>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>navOff</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/heading</property>
        <value type="string">nav1-hold</value>
      </binding>            
    </action>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>navOn</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/heading</property>
        <value type="string"></value>
      </binding>            
    </action>
  </animation>
  
  <!-- Approach / Glideslope -->
  <animation>
    <type>select</type>
    <object-name>apprOff</object-name>
    <condition>
      <not>
        <equals>
          <property>/autopilot/locks/altitude</property>
          <value type="string">gs1-hold</value>
        </equals>
      </not>
    </condition>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>apprOff</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/altitude</property>
        <value type="string">gs1-hold</value>
      </binding>
    </action>
  </animation>
  
  <animation>
    <type>pick</type>
    <visible>true</visible>
    <object-name>apprOn</object-name>
    <action>
      <button>0</button>
      <binding>
        <command>property-assign</command>
        <property>/autopilot/locks/altitude</property>
        <value type="string"></value>
      </binding>            
    </action>
  </animation>
  
</PropertyList>
