Board index FlightGear Support Hardware

Thrustmaster TCA-Quadrant-Boeing-1&2.xml

Joysticks, pedals, monitors.

Thrustmaster TCA-Quadrant-Boeing-1&2.xml

Postby Steward Airborn » Sat Jan 15, 2022 10:29 am

Hi everyone,

I've made a .xml file for the TCA-Quadrant-Boeing for FlightGear.
The first lever is for the speedbrakes
The second lever for the throttles
The thirth lever is for the flaps
The heading select knop jumps to the current heading when pushed and adjust the value when turned.

So far this works, but if there are more skilled developers out there, feel free to share it on this forum.

Code: Select all
<?xml version="1.0"?>

<PropertyList>
  <name type="string">TCA Quadrant Boeing 1&amp;2</name>
  <axis>
    <desc type="string">Speedbrakes</desc>
    <repeatable type="string">false</repeatable>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">/controls/flight/speedbrake-lever</property>
      <factor type="double">0.5</factor>
      <offset type="double">1</offset>
      <setting type="double">-1</setting>
    </binding>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">/controls/flight/speedbrake</property>
      <factor type="double">0.5</factor>
      <offset type="double">1</offset>
      <setting type="double">-1</setting>
    </binding>
    <low>
      <binding n="0" type="string">
      </binding>
      <binding n="0">
        <offset type="double">1</offset>
      </binding>
    </low>
  </axis>
  <axis n="1">
    <desc type="string">Throttle All Engines</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">/controls/engines/throttle-all</property>
      <factor type="double">1</factor>
      <offset type="double">0</offset>
      <power type="double">1</power>
    </binding>
  </axis>
  <axis n="2">
    <desc type="string">Flaps</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">/controls/flight/flaps</property>
      <factor type="double">0.5</factor>
      <offset type="double">1</offset>
      <power type="double">1</power>
    </binding>
  </axis>
  <button>
    <desc type="string">Brakes</desc>
    <repeatable type="string">false</repeatable>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.applyBrakes(1);</script>
    </binding>
    <mod-up>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.applyBrakes(0);</script>
      </binding>
    </mod-up>
  </button>
  <button n="1">
    <desc type="string">Autopilot disconnect</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.autopilotDisconnect();</script>
    </binding>
    <repeatable type="double">0</repeatable>
  </button>
  <button n="2">
    <desc type="string">Elevator Trim Up</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.elevatorTrim(-1);</script>
    </binding>
    <repeatable type="double">1</repeatable>
  </button>
  <button n="4">
    <desc type="string">Reverser Toggle</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.reverserTogglePosition();</script>
    </binding>
    <repeatable type="double">0</repeatable>
  </button>
  <button n="6">
    <desc type="string">Spoilers Retract</desc>
    <repeatable type="string">false</repeatable>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.stepSpoilers(-1);</script>
    </binding>
    <mod-up>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.stepSpoilers(0);</script>
      </binding>
    </mod-up>
  </button>
  <button n="7">
    <desc type="string">Trigger</desc>
    <repeatable type="string">false</repeatable>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.trigger(1);</script>
    </binding>
    <mod-up>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.trigger(0);</script>
      </binding>
    </mod-up>
  </button>
  <button n="8">
    <desc type="string">Flaps Up</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.flapsDown(-1);</script>
    </binding>
    <repeatable type="double">0</repeatable>
  </button>
  <button n="9">
    <desc type="string">Spoilers Deploy</desc>
    <repeatable type="string">false</repeatable>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.stepSpoilers(1);</script>
    </binding>
    <mod-up>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.stepSpoilers(0);</script>
      </binding>
    </mod-up>
  </button>
  <button n="10">
    <desc type="string">Flaps Down</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.flapsDown(1);</script>
    </binding>
    <repeatable type="double">0</repeatable>
  </button>
  <button n="11">
    <desc type="string">Weapon previous</desc>
    <binding>
      <command type="string">property-adjust</command>
      <property type="string">/controls/armament/weapon-selected</property>
      <step type="string">-1</step>
    </binding>
  </button>
  <button n="13">
    <desc type="string">Weapon next</desc>
    <binding>
      <command type="string">property-adjust</command>
      <property type="string">/controls/armament/weapon-selected</property>
      <step type="string">1</step>
    </binding>
  </button>
  <button n="14">
    <desc type="string">HDG left</desc>
    <binding>
       <command>property-adjust</command>
       <property>it-autoflight/input/hdg</property>
       <min>0</min>
       <max>360</max>
       <wrap>true</wrap>
       <factor>-1</factor>
    </binding>
  </button>
  <button n="15">
    <desc type="string">HDG right</desc>
    <binding>
       <command>property-adjust</command>
       <property>it-autoflight/input/hdg</property>
       <min>0</min>
       <max>360</max>
       <wrap>true</wrap>
       <factor>1</factor>
    </binding>
  </button>
  <button n="16">
    <desc type="string">HDG.sel</desc>
    <repeatable type="string">false</repeatable>
    <binding>
             <command>nasal</command>
             <script>setprop("it-autoflight/input/hdg", math.round(getprop("orientation/heading-magnetic-deg")));</script>
    </binding>
  </button>
</PropertyList>
Steward Airborn
 
Posts: 7
Joined: Sun Feb 21, 2021 12:30 am

Return to Hardware

Who is online

Users browsing this forum: No registered users and 4 guests