Debian Codegraph @

Input/Joysticks/Saitek/ST290-Pro.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2 <!--
3
4 Linux/Windows/Mac Axis Numbers:
5 0 Aileron (positive == right)
6 1 Elevator (positive == down/back/nose-up)
7 2 throttle (positive == forward)
8 3 Twist grip "rudder" control
9 4 Hat left/right (view)
10 5 Hat up/down (elevator trim)
11
12 Button Numbers (Identical b/w Linux/Windows/Mac):
13 0 Brakes (trigger)
14 1 Gear toggle (labeled 2)
15 2 unassigned (labeled 3)
16 3 Flap down (labeled 4)
17 4 unassigned (labeled 5)
18 5 Flap up (labeled 6)
19
20 $Id$
21 -->
22 <PropertyList>
23 <name>Saitek ST290 Pro</name>
24 <name>SAITEK Saitek ST290 Pro</name>
25
26 <axis n="0">
27 <desc>Aileron</desc>
28 <binding>
29 <command>property-scale</command>
30 <property>/controls/flight/aileron</property>
31 <squared type="bool">true</squared>
32 </binding>
33 </axis>
34
35 <axis n="1">
36 <desc>Elevator</desc>
37 <binding>
38 <command>property-scale</command>
39 <property>/controls/flight/elevator</property>
40 <factor type="double">-1.0</factor>
41 <squared type="bool">true</squared>
42 </binding>
43 </axis>
44
45 <axis>
46 <desc>Throttle</desc>
47 <number>
48 <unix>2</unix>
49 <mac>2</mac>
50 <windows>2</windows>
51 </number>
52 <binding>
53 <command>nasal</command>
54 <script>controls.throttleAxis()</script>
55 </binding>
56 </axis>
57
58 <axis n="3">
59 <desc>Rudder</desc>
60 <binding>
61 <command>property-scale</command>
62 <property>/controls/flight/rudder</property>
63 </binding>
64
65 <binding>
66 <command>nasal</command>
67 <script><![CDATA[
68 # In mode 3 (taxiing), map the wheelbrakes
69 if(getprop("/input/joysticks/js[0]/saitek-x45-mode") == 3) {
70 val = cmdarg().getNode("setting").getValue();
71 setprop("/controls/gear/brake-left", 0);
72 setprop("/controls/gear/brake-right", 0);
73 if(val > 0) { setprop("/controls/gear/brake-right", val); }
74 else { setprop("/controls/gear/brake-left", -val); }
75 }
76 ]]></script>
77 </binding>
78 </axis>
79
80 <!-- Hat -->
81
82 <axis>
83 <number>
84 <unix>4</unix>
85 <mac>4</mac>
86 <windows>6</windows>
87 </number>
88 <desc>View Direction</desc>
89 <low>
90 <repeatable>true</repeatable>
91 <binding>
92 <command>nasal</command>
93 <script>view.panViewDir(1)</script>
94 </binding>
95 </low>
96 <high>
97 <repeatable>true</repeatable>
98 <binding>
99 <command>nasal</command>
100 <script>view.panViewDir(-1)</script>
101 </binding>
102 </high>
103 </axis>
104
105 <axis>
106 <number>
107 <unix>5</unix>
108 <mac>5</mac>
109 <windows>7</windows>
110 </number>
111 <desc>Elevator trim</desc>
112 <binding><command>null</command></binding>
113 <interval-sec type="double">0.02</interval-sec>
114 <low>
115 <repeatable type="bool">true</repeatable>
116 <binding>
117 <command>property-adjust</command>
118 <property>/controls/flight/elevator-trim</property>
119 <step type="double">0.001</step>
120 </binding>
121 </low>
122 <high>
123 <repeatable type="bool">true</repeatable>
124 <binding>
125 <command>property-adjust</command>
126 <property>/controls/flight/elevator-trim</property>
127 <step type="double">-0.001</step>
128 </binding>
129 </high>
130 </axis>
131
132 <!-- buttons -->
133
134 <button n="0">
135 <desc>Brakes</desc>
136 <binding>
137 <command>nasal</command>
138 <script>controls.applyBrakes(1)</script>
139 </binding>
140 <mod-up>
141 <binding>
142 <command>nasal</command>
143 <script>controls.applyBrakes(0)</script>
144 </binding>
145 </mod-up>
146 </button>
147
148 <!-- Gear toggle on button A -->
149
150 <button n="1">
151 <desc>Landing Gear Up/Down Toggle</desc>
152 <binding>
153 <command>nasal</command>
154 <script>controls.gearToggle()</script>
155 </binding>
156 </button>
157
158 <!-- Flap control on the throttle upper hat -->
159
160 <button n="3">
161 <desc>Increase flaps</desc>
162 <binding>
163 <command>nasal</command>
164 <script>controls.flapsDown(1)</script>
165 </binding>
166 <mod-up>
167 <binding>
168 <command>nasal</command>
169 <script>controls.flapsDown(0)</script>
170 </binding>
171 </mod-up>
172 </button>
173
174 <button n="5">
175 <desc>Decrease flaps</desc>
176 <binding>
177 <command>nasal</command>
178 <script>controls.flapsDown(-1)</script>
179 </binding>
180 <mod-up>
181 <binding>
182 <command>nasal</command>
183 <script>controls.flapsDown(0)</script>
184 </binding>
185 </mod-up>
186 </button>
187
188 </PropertyList>