Remove excess name tags
[fg:toms-fgdata.git] / Input / Joysticks / Saitek / X45.xml
1 <?xml version="1.0"?>
2 <!--
3 Only a few stick controls have been mapped here:
4  + "Rocker" switch:     Rudder
5  + Top rotary dial:     Mixture
6  + Bottom rotary dial:  Prop Advance
7  + Top stick hat:       Elevator & Aileron trim
8  + Bottom stick hat:    View direction
9  + Top throttle hat:    Flaps & Rudder trim
10  + Stick button "A":    Gear toggle
11  + Stick button "C":    Reset view (hackish)
12
13 Axis Numbers:
14   0 Roll (positive == right)
15   1 Pitch (positive == down/back/nose-up)
16   2 top "rotary dial" on the throttle (positive == CCW)
17   3 Rocker switch ("rudder" control) on the throttle (positive == right)
18   4 Throttle (positive == back/down/idle)
19   5 Bottom "rotary dial" on the throttle (positive == CW)
20   6 Lower right hat horizontal axis (positive == right)
21   7 Lower right hat vertical axis (positive == down)
22
23 Button Numbers:
24  0 Trigger
25  1 Stick top "A" switch
26  2 Stick top "B" switch
27  3 Stick top "launch/fire" switch
28  4 Throttle "D" switch
29  5 Throttle "mouse" switch (tiny black thumb button)
30  6 Stick "pinkie" switch
31  7 Stick front "C" switch
32  8 -+                                left position   ("M1")
33  9  +- Throttle "mode" 3-way switch: middle position ("M2")
34 10 -+                                right position  ("M3")
35 11 -+                                left position
36 12  +- Throttle "Aux" 3-way switch:  middle position
37 13 -+                                right position
38 14 Upper left hat in "up" position
39 15 Upper left hat in "right" position
40 16 Upper left hat in "down" position
41 17 Upper left hat in "left" position
42 18 Throttle forefinger hat in "up/back" position
43 19 Throttle forefinger hat in "right" position
44 20 Throttle forefinger hat in "down/forward" position
45 21 Throttle forefinger hat in "left" position
46 22 Throttle thumb hat in "up" position
47 23 Throttle thumb hat in "right" position
48 24 Throttle thumb hat in "down" position
49 25 Throttle thumb hat in "left" position
50 -->
51 <PropertyList>
52  <name>Saitek Saitek X45</name>
53
54  <axis n="0">
55   <desc>Aileron</desc>
56   <binding>
57    <command>property-scale</command>
58    <property>/controls/aileron</property>
59    <squared type="bool">true</squared>
60   </binding>
61  </axis>
62
63  <axis n="1">
64   <desc>Elevator</desc>
65   <binding>
66    <command>property-scale</command>
67    <property>/controls/elevator</property>
68    <factor type="double">-1.0</factor>
69    <squared type="bool">true</squared>
70   </binding>
71  </axis>
72
73  <axis n="3">
74   <desc>Rudder</desc>
75   <binding>
76    <command>property-scale</command>
77    <property>/controls/rudder</property>
78   </binding>
79  </axis>
80
81  <axis n="4">
82   <desc>Throttle</desc>
83   <binding>
84    <command>property-scale</command>
85    <property>/controls/throttle[0]</property>
86    <offset type="double">-1.0</offset>
87    <factor type="double">-0.5</factor>
88   </binding>
89   <binding>
90    <command>property-scale</command>
91    <property>/controls/throttle[1]</property>
92    <offset type="double">-1.0</offset>
93    <factor type="double">-0.5</factor>
94   </binding>
95  </axis>
96
97  <axis n="2">
98   <desc>Mixture</desc>
99   <binding>
100    <command>property-scale</command>
101    <property>/controls/mixture[0]</property>
102    <offset type="double">-1.0</offset>
103    <factor type="double">-0.5</factor>
104   </binding>
105   <binding>
106    <command>property-scale</command>
107    <property>/controls/mixture[1]</property>
108    <offset type="double">-1.0</offset>
109    <factor type="double">-0.5</factor>
110   </binding>
111  </axis>
112
113  <axis n="5">
114   <desc>Propeller Advance</desc>
115   <binding>
116    <command>property-scale</command>
117    <property>/controls/propeller-pitch[0]</property>
118   </binding>
119   <binding>
120    <command>property-scale</command>
121    <property>/controls/propeller-pitch[1]</property>
122   </binding>
123  </axis>
124
125  <!-- View Direction Hat -->
126
127  <axis n="6">
128   <desc>View Direction</desc>
129   <low>
130    <repeatable>true</repeatable>
131    <binding>
132     <command>property-adjust</command>
133     <property>/sim/current-view/goal-heading-offset-deg</property>
134     <step type="double">1.0</step>
135    </binding>
136   </low>
137   <high>
138    <repeatable>true</repeatable>
139    <binding>
140     <command>property-adjust</command>
141     <property>/sim/current-view/goal-heading-offset-deg</property>
142     <step type="double">-1.0</step>
143    </binding>
144   </high>
145  </axis>
146
147  <axis n="7">
148   <desc>View Elevation</desc>
149   <low>
150    <repeatable>true</repeatable>
151    <binding>
152     <command>property-adjust</command>
153     <property>/sim/current-view/goal-pitch-offset-deg</property>
154     <step type="double">1.0</step>
155    </binding>
156   </low>
157   <high>
158    <repeatable>true</repeatable>
159    <binding>
160     <command>property-adjust</command>
161     <property>/sim/current-view/goal-pitch-offset-deg</property>
162     <step type="double">-1.0</step>
163    </binding>
164   </high>
165  </axis>
166
167  <!-- Reset the view parameters with button C on the front of the  -->
168  <!-- stick.  This is a hack that matches the A-4 cockpit settings -->
169  <!-- that I like.  There needs to be a place to put default view  -->
170  <!-- settings somewhere. -->
171
172  <button n="7">
173   <desc>Reset View</desc>
174   <binding>
175    <command>property-assign</command>
176    <property>/sim/current-view/goal-heading-offset-deg</property>
177    <value type="double">0</value>
178   </binding>
179   <binding>
180    <command>property-assign</command>
181    <property>/sim/current-view/goal-pitch-offset-deg</property>
182    <value type="double">-17</value>
183   </binding>
184   <binding>
185    <command>property-assign</command>
186    <property>/sim/current-view/field-of-view</property>
187    <value type="double">65.0</value>
188   </binding>
189  </button>
190
191  <!-- The trigger operates the brakes -->
192
193  <button n="0">
194   <desc>Brakes</desc>
195   <binding>
196    <command>property-assign</command>
197    <property>/controls/brakes[0]</property>
198    <value type="double">1.0</value>
199   </binding>
200   <binding>
201    <command>property-assign</command>
202    <property>/controls/brakes[1]</property>
203    <value type="double">1.0</value>
204   </binding>
205   <binding>
206    <command>property-assign</command>
207    <property>/controls/brakes[2]</property>
208    <value type="double">1.0</value>
209   </binding>
210   <mod-up>
211    <binding>
212     <command>property-assign</command>
213     <property>/controls/brakes[0]</property>
214     <value type="double">0.0</value>
215    </binding>
216    <binding>
217     <command>property-assign</command>
218     <property>/controls/brakes[1]</property>
219     <value type="double">0.0</value>
220    </binding>
221    <binding>
222     <command>property-assign</command>
223     <property>/controls/brakes[2]</property>
224     <value type="double">0.0</value>
225    </binding>
226   </mod-up>
227  </button>
228
229  <!-- Gear toggle on button A -->
230
231  <button n="1">
232   <desc>Landing Gear Up/Down Toggle</desc>
233   <binding>
234    <command>property-toggle</command>
235    <property>/controls/gear-down</property>
236   </binding>
237  </button>
238
239  <!-- Trim on the throttle too (Andy finds this more comfortable) -->
240
241  <button n="25">
242   <desc>Elevator trim up</desc>
243   <repeatable type="bool">true</repeatable>
244   <binding>
245    <command>property-adjust</command>
246    <property>/controls/elevator-trim</property>
247    <step type="double">-0.001</step>
248   </binding>
249  </button>
250  <button n="23">
251   <desc>Elevator trim down</desc>
252   <repeatable type="bool">true</repeatable>
253   <binding>
254    <command>property-adjust</command>
255    <property>/controls/elevator-trim</property>
256    <step type="double">0.001</step>
257   </binding>
258  </button>
259
260  <!-- Trim (upper) hat on the stick -->
261
262  <button n="14">
263   <desc>Elevator trim down</desc>
264   <repeatable type="bool">true</repeatable>
265   <binding>
266    <command>property-adjust</command>
267    <property>/controls/elevator-trim</property>
268    <step type="double">0.0015</step>
269   </binding>
270  </button>
271
272  <button n="15">
273   <desc>Aileron trim right</desc>
274   <repeatable type="bool">true</repeatable>
275   <binding>
276    <command>property-adjust</command>
277    <property>/controls/aileron-trim</property>
278    <step type="double">0.0015</step>
279   </binding>
280  </button>
281
282  <button n="16">
283   <desc>Elevator trim up</desc>
284   <repeatable type="bool">true</repeatable>
285   <binding>
286    <command>property-adjust</command>
287    <property>/controls/elevator-trim</property>
288    <step type="double">-0.0015</step>
289   </binding>
290  </button>
291
292  <button n="17">
293   <desc>Aileron trim left</desc>
294   <repeatable type="bool">true</repeatable>
295   <binding>
296    <command>property-adjust</command>
297    <property>/controls/aileron-trim</property>
298    <step type="double">-0.0015</step>
299   </binding>
300  </button>
301
302  <!-- Flap control on the throttle upper hat -->
303
304  <button n="18">
305   <desc>Decrease flaps</desc>
306   <binding>
307    <command>property-adjust</command>
308    <property>/controls/flaps</property>
309    <step type="double">-0.34</step>
310   </binding>
311  </button>
312
313  <button n="20">
314   <desc>Increase flaps</desc>
315   <binding>
316    <command>property-adjust</command>
317    <property>/controls/flaps</property>
318    <step type="double">0.34</step>
319   </binding>
320  </button>
321
322  <!-- Rudder trim on the flap hat -->
323
324  <button n="19">
325   <desc>Rudder trim right</desc>
326   <repeatable type="bool">true</repeatable>
327   <binding>
328    <command>property-adjust</command>
329    <property>/controls/rudder-trim</property>
330    <step type="double">0.0015</step>
331   </binding>
332  </button>
333
334  <button n="21">
335   <desc>Rudder trim left</desc>
336   <repeatable type="bool">true</repeatable>
337   <binding>
338    <command>property-adjust</command>
339    <property>/controls/rudder-trim</property>
340    <step type="double">-0.0015</step>
341   </binding>
342  </button>
343
344 </PropertyList>