2002-07-10 17:52:49 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!--
|
|
|
|
Only a few stick controls have been mapped here:
|
|
|
|
+ "Rocker" switch: Rudder
|
|
|
|
+ Top rotary dial: Mixture
|
|
|
|
+ Bottom rotary dial: Prop Advance
|
|
|
|
+ Top stick hat: Elevator & Aileron trim
|
|
|
|
+ Bottom stick hat: View direction
|
|
|
|
+ Top throttle hat: Flaps & Rudder trim
|
|
|
|
+ Stick button "A": Gear toggle
|
|
|
|
+ Stick button "C": Reset view (hackish)
|
|
|
|
|
2004-05-06 16:12:32 +00:00
|
|
|
Linux/Windows/Mac Axis Numbers:
|
|
|
|
0 Roll (positive == right)
|
|
|
|
1 Pitch (positive == down/back/nose-up)
|
2005-06-20 17:12:16 +00:00
|
|
|
2/5/5 top "rotary dial" on the throttle (positive == CCW)
|
2004-05-06 16:12:32 +00:00
|
|
|
3 Rocker switch ("rudder" control) on the throttle (positive == right)
|
|
|
|
4/2/2 Throttle (positive == back/down/idle)
|
2005-06-20 17:12:16 +00:00
|
|
|
5/4/4 Bottom "rotary dial" on the throttle (positive == CW)
|
2004-05-06 16:12:32 +00:00
|
|
|
Strange this axis doesn't seem to exist on Mac OS X!
|
2005-06-20 17:12:16 +00:00
|
|
|
6/6/6 Lower right hat horizontal axis (positive == right)
|
|
|
|
7/7/7 Lower right hat vertical axis (positive == down (Mac positive is UP))
|
2002-07-10 17:52:49 +00:00
|
|
|
|
2004-05-06 16:12:32 +00:00
|
|
|
Button Numbers (Identical b/w Linux/Windows/Mac):
|
2004-04-30 15:24:04 +00:00
|
|
|
0 Trigger
|
|
|
|
1 Stick top "A" switch
|
|
|
|
2 Stick top "B" switch
|
|
|
|
3 Stick top "launch/fire" switch
|
|
|
|
4 Throttle "D" switch
|
|
|
|
5 Throttle "mouse" switch (tiny black thumb button)
|
|
|
|
6 Stick "pinkie" switch
|
|
|
|
7 Stick front "C" switch
|
|
|
|
8 -+ left position ("M1")
|
|
|
|
9 +- Throttle "mode" 3-way switch: middle position ("M2")
|
|
|
|
10 -+ right position ("M3")
|
|
|
|
11 -+ left position
|
|
|
|
12 +- Throttle "Aux" 3-way switch: middle position
|
|
|
|
13 -+ right position
|
|
|
|
14 Upper left hat in "up" position
|
|
|
|
15 Upper left hat in "right" position
|
|
|
|
16 Upper left hat in "down" position
|
|
|
|
17 Upper left hat in "left" position
|
|
|
|
18 Throttle forefinger hat in "up/back" position
|
|
|
|
19 Throttle forefinger hat in "right" position
|
|
|
|
20 Throttle forefinger hat in "down/forward" position
|
|
|
|
21 Throttle forefinger hat in "left" position
|
|
|
|
22 Throttle thumb hat in "up" position
|
|
|
|
23 Throttle thumb hat in "right" position
|
|
|
|
24 Throttle thumb hat in "down" position
|
|
|
|
25 Throttle thumb hat in "left" position
|
2003-06-29 08:33:59 +00:00
|
|
|
|
|
|
|
$Id$
|
2002-07-10 17:52:49 +00:00
|
|
|
-->
|
|
|
|
<PropertyList>
|
2004-05-06 16:12:32 +00:00
|
|
|
<name>Saitek X45</name>
|
2002-07-10 17:52:49 +00:00
|
|
|
<name>Saitek Saitek X45</name>
|
2004-04-30 15:26:55 +00:00
|
|
|
<name>Saitek X45 Flight Controller USB</name>
|
2005-06-20 17:12:16 +00:00
|
|
|
<name>Saitek X45 Flight Control Stick </name>
|
2002-07-10 17:52:49 +00:00
|
|
|
|
|
|
|
<axis n="0">
|
|
|
|
<desc>Aileron</desc>
|
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
2003-04-01 12:41:12 +00:00
|
|
|
<property>/controls/flight/aileron</property>
|
2002-07-10 17:52:49 +00:00
|
|
|
<squared type="bool">true</squared>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<axis n="1">
|
|
|
|
<desc>Elevator</desc>
|
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
2003-04-01 12:41:12 +00:00
|
|
|
<property>/controls/flight/elevator</property>
|
2002-07-10 17:52:49 +00:00
|
|
|
<factor type="double">-1.0</factor>
|
|
|
|
<squared type="bool">true</squared>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<axis n="3">
|
|
|
|
<desc>Rudder</desc>
|
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
2003-04-01 12:41:12 +00:00
|
|
|
<property>/controls/flight/rudder</property>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
|
2003-02-16 01:25:46 +00:00
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script><![CDATA[
|
|
|
|
# In mode 3 (taxiing), map the wheelbrakes
|
|
|
|
if(getprop("/input/joysticks/js[0]/saitek-x45-mode") == 3) {
|
|
|
|
val = cmdarg().getNode("setting").getValue();
|
2004-01-12 17:49:33 +00:00
|
|
|
setprop("/controls/gear/brake-left", 0);
|
|
|
|
setprop("/controls/gear/brake-right", 0);
|
|
|
|
if(val > 0) { setprop("/controls/gear/brake-right", val); }
|
|
|
|
else { setprop("/controls/gear/brake-left", -val); }
|
2003-12-23 17:31:08 +00:00
|
|
|
}
|
|
|
|
]]></script>
|
2003-02-16 01:25:46 +00:00
|
|
|
</binding>
|
2002-07-10 17:52:49 +00:00
|
|
|
</axis>
|
|
|
|
|
|
|
|
<!-- View Direction Hat -->
|
|
|
|
|
|
|
|
<axis n="6">
|
2004-05-06 16:12:32 +00:00
|
|
|
<number>
|
|
|
|
<unix>6</unix>
|
2005-02-11 15:30:45 +00:00
|
|
|
<mac>6</mac>
|
2004-05-06 16:12:32 +00:00
|
|
|
<windows>6</windows>
|
|
|
|
</number>
|
2002-07-10 17:52:49 +00:00
|
|
|
<desc>View Direction</desc>
|
|
|
|
<low>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>view.panViewDir(1)</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
|
|
|
</low>
|
|
|
|
<high>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>view.panViewDir(-1)</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
|
|
|
</high>
|
|
|
|
</axis>
|
|
|
|
|
2004-05-06 16:12:32 +00:00
|
|
|
<axis>
|
2002-07-10 17:52:49 +00:00
|
|
|
<desc>View Elevation</desc>
|
2004-05-06 16:12:32 +00:00
|
|
|
<number>
|
|
|
|
<unix>7</unix>
|
2005-02-11 15:30:45 +00:00
|
|
|
<mac>7</mac>
|
2004-05-06 16:12:32 +00:00
|
|
|
<windows>7</windows>
|
|
|
|
</number>
|
2002-07-10 17:52:49 +00:00
|
|
|
<low>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>view.panViewPitch(1)</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
|
|
|
</low>
|
|
|
|
<high>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>view.panViewPitch(-1)</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
|
|
|
</high>
|
|
|
|
</axis>
|
|
|
|
|
2004-04-30 15:24:04 +00:00
|
|
|
<axis>
|
|
|
|
<desc>Throttle</desc>
|
|
|
|
<number>
|
|
|
|
<unix>4</unix>
|
2004-05-06 16:12:32 +00:00
|
|
|
<mac>2</mac>
|
2005-06-20 17:12:16 +00:00
|
|
|
<windows>2</windows>
|
2004-04-30 15:24:04 +00:00
|
|
|
</number>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.throttleAxis()</script>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<axis>
|
|
|
|
<desc>Mixture</desc>
|
|
|
|
<number>
|
|
|
|
<unix>2</unix>
|
2005-06-20 17:12:16 +00:00
|
|
|
<mac>5</mac>
|
2004-04-30 15:24:04 +00:00
|
|
|
<windows>5</windows>
|
|
|
|
</number>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.mixtureAxis()</script>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<axis>
|
|
|
|
<desc>Propeller Advance</desc>
|
|
|
|
<number>
|
|
|
|
<unix>5</unix>
|
2005-06-20 17:12:16 +00:00
|
|
|
<mac>4</mac>
|
2004-04-30 15:24:04 +00:00
|
|
|
<windows>4</windows>
|
|
|
|
</number>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.propellerAxis(-1)</script>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
2002-07-10 17:52:49 +00:00
|
|
|
<button n="7">
|
|
|
|
<desc>Reset View</desc>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>view.resetView()</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="0">
|
|
|
|
<desc>Brakes</desc>
|
|
|
|
<binding>
|
2004-01-12 17:49:33 +00:00
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/controls/gear/brake-left</property>
|
|
|
|
<value type="double">1.0</value>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<binding>
|
2004-01-12 17:49:33 +00:00
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/controls/gear/brake-right</property>
|
|
|
|
<value type="double">1.0</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/controls/gear/brake-left</property>
|
|
|
|
<value type="double">0.0</value>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/controls/gear/brake-right</property>
|
|
|
|
<value type="double">0.0</value>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Gear toggle on button A -->
|
|
|
|
|
|
|
|
<button n="1">
|
|
|
|
<desc>Landing Gear Up/Down Toggle</desc>
|
|
|
|
<binding>
|
2005-06-16 07:59:33 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.gearToggle()</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
2003-02-16 01:25:46 +00:00
|
|
|
<!-- mode switch (buttons 8-10) -->
|
|
|
|
|
|
|
|
<button n="8">
|
|
|
|
<desc>Mode 1</desc>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>setprop("/input/joysticks/js[0]/saitek-x45-mode", 1)</script>
|
2003-02-16 01:25:46 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="9">
|
|
|
|
<desc>Mode 2</desc>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>setprop("/input/joysticks/js[0]/saitek-x45-mode", 2)</script>
|
2003-02-16 01:25:46 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="10">
|
|
|
|
<desc>Mode 3</desc>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>setprop("/input/joysticks/js[0]/saitek-x45-mode", 3)</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Trim (upper) hat on the stick -->
|
|
|
|
|
|
|
|
<button n="14">
|
|
|
|
<desc>Elevator trim down</desc>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.elevatorTrim(1)</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="15">
|
|
|
|
<desc>Aileron trim right</desc>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.aileronTrim(1)</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="16">
|
|
|
|
<desc>Elevator trim up</desc>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.elevatorTrim(-1)</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="17">
|
|
|
|
<desc>Aileron trim left</desc>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.aileronTrim(-1)</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Flap control on the throttle upper hat -->
|
|
|
|
|
|
|
|
<button n="18">
|
|
|
|
<desc>Decrease flaps</desc>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
2005-06-22 13:08:01 +00:00
|
|
|
<script>controls.flapsDown(-1)</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
2005-06-22 13:08:01 +00:00
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.flapsDown(0)</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
2002-07-10 17:52:49 +00:00
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="20">
|
|
|
|
<desc>Increase flaps</desc>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
2005-06-22 13:08:01 +00:00
|
|
|
<script>controls.flapsDown(1)</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
2005-06-22 13:08:01 +00:00
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.flapsDown(0)</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
2002-07-10 17:52:49 +00:00
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Rudder trim on the flap hat -->
|
|
|
|
|
|
|
|
<button n="19">
|
|
|
|
<desc>Rudder trim right</desc>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.rudderTrim(1)</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="21">
|
|
|
|
<desc>Rudder trim left</desc>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
2003-12-23 17:31:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.rudderTrim(-1)</script>
|
2002-07-10 17:52:49 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</PropertyList>
|