Curt Olson:
Initial revision. This is the only joystick that the Walmart next to my house is selling. (What are you going to do?) Buttons 2 and 4 are still unmapped awaiting any good suggestions.
This commit is contained in:
parent
4100dc0f7b
commit
55ae4801f7
1 changed files with 203 additions and 0 deletions
203
Input/Joysticks/Saitek/ST290-Pro.xml
Normal file
203
Input/Joysticks/Saitek/ST290-Pro.xml
Normal file
|
@ -0,0 +1,203 @@
|
|||
<?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)
|
||||
|
||||
Linux/Windows/Mac Axis Numbers:
|
||||
0 Aileron (positive == right)
|
||||
1 Elevator (positive == down/back/nose-up)
|
||||
2 throttle (positive == forward)
|
||||
3 Twist grip "rudder" control
|
||||
4 Hat left/right (view)
|
||||
5 Hat up/down (elevator trim)
|
||||
|
||||
Button Numbers (Identical b/w Linux/Windows/Mac):
|
||||
0 Trigger (brake)
|
||||
1 Gear toggle (labeled 2)
|
||||
2 unassigned (labeled 3)
|
||||
3 Flap down (labeled 4)
|
||||
4 unassigned (labeled 5)
|
||||
5 Flap up (labeled 6)
|
||||
|
||||
$Id$
|
||||
-->
|
||||
<PropertyList>
|
||||
<name>Saitek ST290 Pro</name>
|
||||
|
||||
<axis n="0">
|
||||
<desc>Aileron</desc>
|
||||
<binding>
|
||||
<command>property-scale</command>
|
||||
<property>/controls/flight/aileron</property>
|
||||
<squared type="bool">true</squared>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
<axis n="1">
|
||||
<desc>Elevator</desc>
|
||||
<binding>
|
||||
<command>property-scale</command>
|
||||
<property>/controls/flight/elevator</property>
|
||||
<factor type="double">-1.0</factor>
|
||||
<squared type="bool">true</squared>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
<axis>
|
||||
<desc>Throttle</desc>
|
||||
<number>
|
||||
<unix>2</unix>
|
||||
<mac>2</mac>
|
||||
<windows>2</windows>
|
||||
</number>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.throttleAxis()</script>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
<axis n="3">
|
||||
<desc>Rudder</desc>
|
||||
<binding>
|
||||
<command>property-scale</command>
|
||||
<property>/controls/flight/rudder</property>
|
||||
</binding>
|
||||
|
||||
<binding>
|
||||
<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();
|
||||
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); }
|
||||
}
|
||||
]]></script>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
<!-- Hat -->
|
||||
|
||||
<axis>
|
||||
<number>
|
||||
<unix>4</unix>
|
||||
<mac>4</mac>
|
||||
<windows>4</windows>
|
||||
</number>
|
||||
<desc>View Direction</desc>
|
||||
<low>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>view.panViewDir(1)</script>
|
||||
</binding>
|
||||
</low>
|
||||
<high>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>view.panViewDir(-1)</script>
|
||||
</binding>
|
||||
</high>
|
||||
</axis>
|
||||
|
||||
<axis n="5">
|
||||
<desc>Elevator trim</desc>
|
||||
<binding><command>null</command></binding>
|
||||
<interval-sec type="double">0.02</interval-sec>
|
||||
<low>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/controls/flight/elevator-trim</property>
|
||||
<step type="double">0.001</step>
|
||||
</binding>
|
||||
</low>
|
||||
<high>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/controls/flight/elevator-trim</property>
|
||||
<step type="double">-0.001</step>
|
||||
</binding>
|
||||
</high>
|
||||
</axis>
|
||||
|
||||
<!-- buttons -->
|
||||
|
||||
<button n="0">
|
||||
<desc>Brakes</desc>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>/controls/gear/brake-left</property>
|
||||
<value type="double">1.0</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<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>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<!-- Gear toggle on button A -->
|
||||
|
||||
<button n="1">
|
||||
<desc>Landing Gear Up/Down Toggle</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.gearToggle()</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<!-- Flap control on the throttle upper hat -->
|
||||
|
||||
<button n="3">
|
||||
<desc>Increase flaps</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.flapsDown(1)</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.flapsDown(0)</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<button n="5">
|
||||
<desc>Decrease flaps</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.flapsDown(-1)</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.flapsDown(0)</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
</PropertyList>
|
Loading…
Reference in a new issue