1
0
Fork 0

Add five joystick xml files.

Added the below files:
SwitchPanel.xml
Combatstick568.xml
Honeycomb-Aeronautical-Alpha-Flight-Controls.xml
g25-racing-wheel.xml
T-Rudder.xml
These files were posted on the FlightGear forum.
This commit is contained in:
puffergas 2021-03-05 11:02:57 -05:00 committed by Florent Rougon
parent beee534b09
commit cf88bf433c
5 changed files with 930 additions and 0 deletions

View file

@ -0,0 +1,260 @@
<?xml version="1.0"?>
<!--
****************************************************************
*Re: Joystick xml codes Library project - open for contributi
*Postby FCar » Sun May 29, 2016 6:28 am
*
*Saitek Switch Panel Event XML file:
****************************************************************
-->
<PropertyList>
<name>Saitek Pro Flight Switch Panel</name>
<name>HOLTEK Saitek Pro Flight Switch Panel</name>
<debug-events type="bool">true</debug-events>
<event>
<name>button-0</name>
<desc>Battery master</desc>
<binding>
<command>property-assign</command>
<property>/controls/switches/master-bat</property>
<value>true</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/switches/master-bat</property>
<value>false</value>
</binding>
</mod-up>
</event>
<event>
<name>button-1</name>
<desc>Alternator master</desc>
<binding>
<command>property-assign</command>
<property>/controls/switches/master-alt</property>
<value>true</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/switches/master-alt</property>
<value>false</value>
</binding>
</mod-up>
</event>
<event>
<name>button-2</name>
<desc>Avionics master</desc>
<binding>
<command>property-assign</command>
<property>/controls/switches/master-avionics</property>
<value>true</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/switches/master-avionics</property>
<value>false</value>
</binding>
</mod-up>
</event>
<event>
<name>button-5</name>
<desc>Pitot heat</desc>
<binding>
<command>property-assign</command>
<property>/controls/anti-ice/pitot-heat</property>
<value>true</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/anti-ice/pitot-heat</property>
<value>false</value>
</binding>
</mod-up>
</event>
<event>
<name>button-7</name>
<desc>Instruments light</desc>
<binding>
<command>property-assign</command>
<property>/controls/lighting/instruments-norm</property>
<value>1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/lighting/instruments-norm</property>
<value>0.0</value>
</binding>
</mod-up>
</event>
<event>
<name>button-8</name>
<desc>Beacon</desc>
<binding>
<command>property-assign</command>
<property>/controls/lighting/beacon</property>
<value>true</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/lighting/beacon</property>
<value>false</value>
</binding>
</mod-up>
</event>
<event>
<name>button-9</name>
<desc>Navigation lights</desc>
<binding>
<command>property-assign</command>
<property>/controls/lighting/nav-lights</property>
<value>true</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/lighting/nav-lights</property>
<value>false</value>
</binding>
</mod-up>
</event>
<event>
<name>button-266</name>
<desc>Strobe</desc>
<binding>
<command>property-assign</command>
<property>/controls/lighting/strobe</property>
<value>true</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/lighting/strobe</property>
<value>false</value>
</binding>
</mod-up>
</event>
<event>
<name>button-267</name>
<desc>Taxi light</desc>
<binding>
<command>property-assign</command>
<property>/controls/lighting/taxi-light</property>
<value>true</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/lighting/taxi-light</property>
<value>false</value>
</binding>
</mod-up>
</event>
<event>
<name>button-268</name>
<desc>Landing lights</desc>
<binding>
<command>property-assign</command>
<property>/controls/lighting/landing-lights</property>
<value>true</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/lighting/landing-lights</property>
<value>false</value>
</binding>
</mod-up>
</event>
<event>
<name>button-side</name>
<desc>Gear</desc>
<binding>
<command>nasal</command>
<script>controls.gearDown(1)</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>controls.gearDown(0)</script>
</binding>
</mod-up>
</event>
<event>
<name>button-269</name>
<desc>Magnetos off</desc>
<binding>
<command>property-assign</command>
<property>/controls/switches/magnetos</property>
<value>0</value>
</binding>
</event>
<event>
<name>button-270</name>
<desc>Magnetos right</desc>
<binding>
<command>property-assign</command>
<property>/controls/switches/magnetos</property>
<value>1</value>
</binding>
</event>
<event>
<name>button-271</name>
<desc>Magnetos right</desc>
<binding>
<command>property-assign</command>
<property>/controls/switches/magnetos</property>
<value>2</value>
</binding>
</event>
<event>
<name>button-left</name>
<desc>Magnetos both</desc>
<binding>
<command>property-assign</command>
<property>/controls/switches/magnetos</property>
<value>3</value>
</binding>
</event>
<event>
<name>button-right</name>
<desc>Starter</desc>
<binding>
<command>property-assign</command>
<property>/controls/switches/starter</property>
<value>true</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/switches/starter</property>
<value>false</value>
</binding>
</mod-up>
</event>
</PropertyList>

View file

@ -0,0 +1,160 @@
<?xml version="1.0"?>
<!--
******************************************************************
* Re: Joystick xml codes Library project - open for contributi
* Postby N-SCOT » Sun Jan 08, 2017 12:42 pm
******************************************************************
-->
<PropertyList>
<name type="string">CH COMBATSTICK USB</name>
<axis n="0">
<desc>Rudder on ground, aileron in flight</desc>
<!-- Implemented on-ground taxi patch by Sebastain Marque -->
<binding>
<condition>
<property>/gear/gear/wow</property>
</condition>
<command>property-scale</command>
<property>/controls/flight/rudder</property>
<squared type="bool">true</squared>
</binding>
<desc>Aileron</desc>
<dead-band type="double">0.02</dead-band>
<binding>
<condition>
<not>
<property>/gear/gear/wow</property>
</not>
</condition>
<command>property-scale</command>
<property>/controls/flight/aileron</property>
<offset type="double">0.0</offset>
<factor type="double">1.0</factor>
<tolerance type="double">0.0</tolerance>
<squared type="bool">true</squared>
<power type="double">2.0</power>
</binding>
</axis>
<axis n="1">
<desc type="string">Elevator</desc>
<binding>
<command type="string">property-scale</command>
<property type="string">/controls/flight/elevator</property>
<factor type="double">-1</factor>
<offset type="double">0</offset>
</binding>
</axis>
<axis n="2">
<desc type="string">Throttle</desc>
<binding>
<command type="string">nasal</command>
<script type="string">controls.throttleAxis();</script>
</binding>
</axis>
<axis n="3">
<desc type="string">View (horizontal)</desc>
<low>
<binding>
<command type="string">nasal</command>
<script type="string">setprop("/sim/current-view/goal-heading-offset-deg", getprop("/sim/current-view/goal-heading-offset-deg") + 30);</script>
</binding>
</low>
<high>
<binding>
<command type="string">nasal</command>
<script type="string">setprop("/sim/current-view/goal-heading-offset-deg", getprop("/sim/current-view/goal-heading-offset-deg") - 30);</script>
</binding>
</high>
</axis>
<axis n="4">
<desc type="string">View (vertical)</desc>
<low>
<binding>
<command type="string">nasal</command>
<script type="string">setprop("/sim/current-view/goal-pitch-offset-deg", getprop("/sim/current-view/goal-pitch-offset-deg") - 20);</script>
</binding>
</low>
<high>
<binding>
<command type="string">nasal</command>
<script type="string">setprop("/sim/current-view/goal-pitch-offset-deg", getprop("/sim/current-view/goal-pitch-offset-deg") + 20);</script>
</binding>
</high>
</axis>
<button>
<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="1">
<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="2">
<desc type="string">Gear Up</desc>
<repeatable type="string">false</repeatable>
<binding>
<command type="string">nasal</command>
<script type="string">controls.gearDown(-1);</script>
</binding>
<mod-up>
<binding>
<command type="string">nasal</command>
<script type="string">controls.gearDown(0);</script>
</binding>
</mod-up>
</button>
<button n="4">
<desc type="string">Propeller Fine</desc>
<binding>
<command type="string">nasal</command>
<script type="string">controls.adjPropeller(1);</script>
</binding>
<repeatable type="double">1</repeatable>
</button>
<button n="5">
<desc type="string">Mixture Rich</desc>
<binding>
<command type="string">nasal</command>
<script type="string">controls.adjMixture(1);</script>
</binding>
<repeatable type="double">1</repeatable>
</button>
<button n="6">
<desc type="string">Propeller Coarse</desc>
<binding>
<command type="string">nasal</command>
<script type="string">controls.adjPropeller(-1);</script>
</binding>
<repeatable type="double">1</repeatable>
</button>
<button n="7">
<desc type="string">Mixture Lean</desc>
<binding>
<command type="string">nasal</command>
<script type="string">controls.adjMixture(-1);</script>
</binding>
<repeatable type="double">1</repeatable>
</button>
</PropertyList>

View file

@ -0,0 +1,397 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2021 FlightGear Flight Simulator
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.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
********************************************************************
Written for the Cessna 172 and only tested on Raspberry Pi OS running
FlightGear 2020.3.6
********************************************************************
-->
<!--
********************************************************************
*
* Bindings for Honeycomb Aeronautical Alpha Flight Controls - Yoke
*
*
* Axis 0: ailerons
* Axis 1: elevator
* Axes 2 and 3 (hat): view direction
*
* Button 0: YOKE white-Trigger left-handle >>>>>>>> View, Cycle Forwards
* Button 1: YOKE white-top-Button left-handle >>>>> View, Reset
* Button 2: YOKE white-top-Button right-handle
* Button 3: YOKE red-top-Button right-handle
* Button 4: YOKE outer-Rocker down left-handle >>>> Elevator Trim, Up
* Button 5: YOKE outer-Rocker up left-handle >>>>>> Elevator Trim, Down
* Button 6: YOKE inner-Rocker down left-handle >>>> Flaps, Down
* Button 7: YOKE inner-Rocker up left-handle >>>>>> Flaps, Up
* Button 8: YOKE top-Rocker inward right-handle >>> Rudder Trim, Left
* Button 9: YOKE top-Rocker outward right-handle >> Rudder Trim, Right
* Button 10: YOKE bottom-Rocker inward right-handle
* Button 11: YOKE bottom-Rocker outward right-handle
* Button 12: BASE Master Alternator up >>>>>>>>>>>>> Master Alternator, ON OFF
* Button 13: BASE Master Alternator down
* Button 14: BASE Master Battery up >>>>>>>>>>>>>>>> Battery, ON OFF
* Button 15: BASE Master Battery down
* Button 16: BASE Avionics Bus1 up >>>>>>>>>>>>>>>>> Master Avionics, ON OFF
* Button 17: BASE Avionics Bus1 down
* Button 18: BASE Avionics Bus2 up
* Button 19: BASE Avionics Bus2 down
* Button 20: BASE Beacon up >>>>>>>>>>>>>>>>>>>>>>>> Beacon, ON OFF
* Button 21: BASE Beacon down
* Button 22: BASE Land up >>>>>>>>>>>>>>>>>>>>>>>>>> Landing Lights, ON OFF
* Button 23: BASE Land down
* Button 24: BASE Taxi up >>>>>>>>>>>>>>>>>>>>>>>>>> Taxi Lights, ON OFF
* Button 25: BASE Taxi down
* Button 26: BASE Nav up >>>>>>>>>>>>>>>>>>>>>>>>>>> Navigation Lights, ON OFF
* Button 27: BASE Nav down
* Button 28: BASE Strobe up >>>>>>>>>>>>>>>>>>>>>>>> Strobe Light, ON OFF
* Button 29: BASE Strobe down
* Button 30: BASE Off >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Magneto, OFF
* Button 31: BASE Right Mag >>>>>>>>>>>>>>>>>>>>>>>> Magneto, Right
* Button 32: BASE Left Mag >>>>>>>>>>>>>>>>>>>>>>>>> See note below
* Button 33: BASE Both Mag >>>>>>>>>>>>>>>>>>>>>>>>> See note below
* Button 34: BASE Start >>>>>>>>>>>>>>>>>>>>>>>>>>>> See note below
********************************************************************
-->
<PropertyList>
<name type="string">Honeycomb Aeronautical Alpha Flight Controls</name>
<axis>
<desc>Aileron</desc>
<binding>
<command>property-scale</command>
<property>/controls/flight/aileron</property>
<factor type="double">1</factor>
<offset type="double">0</offset>
</binding>
</axis>
<axis n="1">
<desc>Elevator</desc>
<binding>
<command>property-scale</command>
<property>/controls/flight/elevator</property>
<factor type="double">-1</factor>
<offset type="double">0</offset>
</binding>
</axis>
<axis n="2">
<desc>View, Direction</desc>
<direction>left</direction>
<low>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>view.panViewDir(1)</script>
<module>__js1</module>
<offset type="double">1</offset>
</binding>
</low>
<high>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>view.panViewDir(-1)</script>
<module>__js1</module>
<offset type="double">1</offset>
</binding>
</high>
</axis>
<axis n="3">
<desc>View, Elevation</desc>
<direction>upward</direction>
<low>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>view.panViewPitch(1)</script>
<module>__js1</module>
<offset type="double">1</offset>
</binding>
</low>
<high>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>view.panViewPitch(-1)</script>
<module>__js1</module>
<offset type="double">1</offset>
</binding>
</high>
</axis>
<button n="0">
<desc>View, Cycle Forwards</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>view.stepView(1)</script>
</binding>
</button>
<button n="1">
<desc>View, Reset</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>
setprop("/sim/current-view/view-number", 0);
view.resetView()
</script>
</binding>
</button>
<button n="4">
<desc>Elevator Trim, Up</desc>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>controls.elevatorTrim(-1)</script>
</binding>
</button>
<button n="5">
<desc>Elevator Trim, Down</desc>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>controls.elevatorTrim(1)</script>
</binding>
</button>
<button n="6">
<desc>Flaps, Down</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>controls.flapsDown(1)</script>
</binding>
</button>
<button n="7">
<desc>Flaps, Up</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>controls.flapsDown(-1)</script>
</binding>
</button>
<button n="8">
<desc>Rudder Trim, Left</desc>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>controls.rudderTrim(-1)</script>
</binding>
</button>
<button n="9">
<desc>Rudder Trim, Right</desc>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>controls.rudderTrim(1)</script>
</binding>
</button>
<button n="12">
<desc>Master Alternator, ON OFF</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>setprop("/controls/switches/master-alt", 1);</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>setprop("/controls/switches/master-alt", 0)</script>
</binding>
</mod-up>
</button>
<button n="14">
<desc>Battery, ON OFF</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>setprop("/controls/switches/master-bat", 1)</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>setprop("/controls/switches/master-bat", 0)</script>
</binding>
</mod-up>
</button>
<button n="16">
<desc>Master Avionics, ON OFF</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>setprop("/controls/switches/master-avionics", 1)</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>setprop("/controls/switches/master-avionics", 0)</script>
</binding>
</mod-up>
</button>
<button n="20">
<desc>Beacon, ON OFF</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>setprop("/controls/lighting/beacon", 1)</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>setprop("/controls/lighting/beacon", 0)</script>
</binding>
</mod-up>
</button>
<button n="22">
<desc>Landing Lights, ON OFF</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>setprop("/controls/lighting/landing-lights", 1)</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>setprop("/controls/lighting/landing-lights", 0)</script>
</binding>
</mod-up>
</button>
<button n="24">
<desc>Taxi Lights, ON OFF</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>setprop("/controls/lighting/taxi-light", 1)</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>setprop("/controls/lighting/taxi-light", 0)</script>
</binding>
</mod-up>
</button>
<button n="26">
<desc>Navigation Lights, ON OFF</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>setprop("/controls/lighting/nav-lights", 1)</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>setprop("/controls/lighting/nav-lights", 0)</script>
</binding>
</mod-up>
</button>
<button n="28">
<desc>Strobe Light, ON OFF</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>setprop("/controls/lighting/strobe", 1)</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>setprop("/controls/lighting/strobe", 0)</script>
</binding>
</mod-up>
</button>
<button n="30">
<desc>Magneto, OFF</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>setprop("/controls/switches/magnetos", 0)</script>
</binding>
</button>
<button n="31">
<desc>Magneto, Right</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>setprop("/controls/switches/magnetos", 1)</script>
</binding>
</button>
<!-- Linux and FlightGear does not handle more than 32 USB buttons.
See FlightGear Ticket 2212.
<button n="32">
<desc>Magneto, Left</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>setprop("/controls/switches/magnetos", 2)</script>
</binding>
</button>
<button n="33">
<desc>Magneto, Both</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>setprop("/controls/switches/magnetos", 3)</script>
</binding>
</button>
<button n="34">
<desc>Starter, ON OFF</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>setprop("/controls/lighting/strobe", 1)</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>setprop("/controls/lighting/strobe", 0)</script>
</binding>
</mod-up>
</button>
-->
</PropertyList>

View file

@ -0,0 +1,54 @@
<?xml version="1.0"?>
<!--
************************************************************************
* Bindings for Logitech G25 Racing Wheel.
* Axis 1: rudder
* Axis 2: rudder
************************************************************************
* Postby Ouacaze » Tue Aug 05, 2014 3:55 pm
*
* Hi,
*
* I've just copied the "Microsoft SideWinder Precision Racing Wheel" xml file and adapted it * to use with the Logitech G25 Racing Wheel.
* It only maps the clutch and throttle pedal as the rudder, but it works well.
*
* NB: I left the tags for Win and OSX as they were for the microsoft, but I only tested this *on Linux. So if someone could try this under Windows and OSX, and maybe try it with a G27, it *would be great !
************************************************************************
$Id$
-->
<PropertyList>
<name>G25 Racing Wheel</name>
<axis n="1">
<desc>Rudder Right</desc>
<number>
<unix>1</unix>
<mac>1</mac>
<windows>2</windows>
</number>
<binding>
<command>property-scale</command>
<property>/controls/flight/rudder</property>
<factor type="double">-0.5</factor>
<offset type="double">-1.0</offset>
<squared type="bool">true</squared>
</binding>
</axis>
<axis n="2">
<desc>Rudder Left</desc>
<number>
<unix>2</unix>
<mac>2</mac>
<windows>3</windows>
</number>
<binding>
<command>property-scale</command>
<property>/controls/flight/rudder</property>
<factor type="double">0.5</factor>
<offset type="double">-1.0</offset>
<squared type="bool">true</squared>
</binding>
</axis>
</PropertyList>

View file

@ -0,0 +1,59 @@
<?xml version="1.0"?>
<!--
************************************************************************
* Setup for Thrustmaster T-Flight rudder pedals.
*
* These are USB rudder pedals with toe brakes. Bindings are as
* follows:
*
* Axis 0 (toe, right pedal): right differential brake
* Axis 1 (toe, left pedal): left differential brake
* Axis 2 (combined sliding pedal action): rudder (and nosewheel)
*
* Settings are similar to the pedals found in the Logitecgh G940 set:
* Axes are numbered right-to-left for brakes.
* Offset and Factor values are negative.
************************************************************************
* Re: Joystick xml codes Library project - open for contributi
* Postby EFConrad » Fri Nov 25, 2016 10:15 am
************************************************************************
$Id$
-->
<PropertyList>
<name>T-Rudder</name>
<axis n="1">
<desc>Brake left</desc>
<binding>
<command>property-scale</command>
<property>/controls/gear/brake-left</property>
<offset>-1.0</offset>
<factor>-0.5</factor>
</binding>
</axis>
<axis n="0">
<desc>Brake right</desc>
<binding>
<command>property-scale</command>
<property>/controls/gear/brake-right</property>
<offset>-1.0</offset>
<factor>-0.5</factor>
</binding>
</axis>
<axis n="2">
<desc>Rudder</desc>
<binding>
<command>property-scale</command>
<property>/controls/flight/rudder</property>
<factor>1.0</factor>
<power>2</power>
<offset>0.0</offset>
</binding>
</axis>
</PropertyList>