<?xml version="1.0"?>

<!-- Button to start gasturbine GTD-16 of turbogenerator TG-16 (APU) -->

<PropertyList>
 <path>../../shared/knobs_buttons/205k.ac</path>

<animation>
  <type>pick</type>
  <object-name>press_me</object-name>
  <visible>true</visible>
  <action>
    <button>0</button>
    <repeatable>false</repeatable>
    <binding>
     <condition>
     <equals>
      <property>an24/AZS/sw0218</property>
      <value>1.0</value>
     </equals>
     </condition>
      <command>nasal</command>
      <script>
        if( getprop("an24/Start-Panel/tg-cold-start" ) == 0.0 ) {
	setprop("/fdm/jsbsim/propulsion/cutoff_cmd", 0.0);
	setprop("/controls/engines/engine[2]/cutoff", 1.0);
	setprop("/controls/engines/engine[2]/starter", 1.0 );
	}
	else {
	setprop("/controls/engines/engine[2]/cutoff", 1.0);
	setprop("/controls/engines/engine[2]/starter", 1.0 );
        settimer(func {setprop("/controls/engines/engine[2]/starter", 0.0 );}, 10.0 );
	}
      </script>
    </binding>
    <binding>
      <command>nasal</command>
      <script>
	interpolate("an24/Start-Panel/starttg-btn", 1.0, 0.1 );
      </script>
    </binding>
   <mod-up>
    <binding>
      <command>nasal</command>
      <script>
	interpolate("an24/Start-Panel/starttg-btn", 0.0, 0.1 );
      </script>
    </binding>
   </mod-up>
  </action>
   <hovered>
     <binding>
       <command>set-tooltip</command>
       <label>TG-16 APU Start</label>
       <tooltip-id>start_tg-16</tooltip-id>
     </binding>
   </hovered>
</animation>

<animation>
  <type>translate</type>
  <object-name>press_me</object-name>
  <property>an24/Start-Panel/starttg-btn</property>
  <factor>0.003</factor>
  <axis>
    <x>0</x>
    <y>0</y>
    <z>-1</z>
  </axis>
</animation>

</PropertyList>
