Update the four axis joystick to the new controlls layout and fix a mistake in the...
[fg:toms-fgdata.git] / Input / Joysticks / Saitek / X8-30.xml
1 <?xml version="1.0"?>
2
3 <!--
4 ************************************************************************
5 Setup for a CH-Flightstick compatible joystick with
6 stick, throttle, one digital hat, and four buttons.
7
8 Layout:
9   Axis 0: ailerons
10   Axis 1: elevator
11   Axis 2: throttle
12
13   Hat:
14     Axis 3: rudder
15     Axis 4: elevator trim
16
17   Button 0: brakes
18   Button 1: center rudder
19   Button 2: flaps up
20   Button 3: flaps down
21
22 ************************************************************************
23 $Id$
24 -->
25
26 <PropertyList>
27
28  <name>Analog 3-axis 4-button 1-hat CHF joystick</name>
29
30
31  <axis n="0">
32   <desc>Aileron</desc>
33   <binding>
34    <command>property-scale</command>
35    <property>/controls/flight/aileron</property>
36    <power type="double">3</power>
37   </binding>
38  </axis>
39
40  <axis n="1">
41   <desc>Elevator</desc>
42   <binding>
43    <command>property-scale</command>
44    <property>/controls/flight/elevator</property>
45    <factor type="double">-1.0</factor>
46    <power type="double">3</power>
47   </binding>
48  </axis>
49
50  <axis n="2">
51   <desc>Throttle</desc>
52   <binding>
53    <command>property-scale</command>
54    <property>/controls/engines/engine[0]/throttle</property>
55    <offset type="double">-1.0</offset>
56    <factor type="double">-0.5</factor>
57   </binding>
58   <binding>
59    <command>property-scale</command>
60    <property>/controls/engines/engine[1]/throttle</property>
61    <offset type="double">-1.0</offset>
62    <factor type="double">-0.5</factor>
63   </binding>
64   <binding>
65    <command>property-scale</command>
66    <property>/controls/engines/engine[2]/throttle</property>
67    <offset type="double">-1.0</offset>
68    <factor type="double">-0.5</factor>
69   </binding>
70   <binding>
71    <command>property-scale</command>
72    <property>/controls/engines/engine[3]/throttle</property>
73    <offset type="double">-1.0</offset>
74    <factor type="double">-0.5</factor>
75   </binding>
76   <binding>
77    <command>property-scale</command>
78    <property>/controls/engines/engine[4]/throttle</property>
79    <offset type="double">-1.0</offset>
80    <factor type="double">-0.5</factor>
81   </binding>
82   <binding>
83    <command>property-scale</command>
84    <property>/controls/engines/engine[5]/throttle</property>
85    <offset type="double">-1.0</offset>
86    <factor type="double">-0.5</factor>
87   </binding>
88   <binding>
89    <command>property-scale</command>
90    <property>/controls/engines/engine[6]/throttle</property>
91    <offset type="double">-1.0</offset>
92    <factor type="double">-0.5</factor>
93   </binding>
94   <binding>
95    <command>property-scale</command>
96    <property>/controls/engines/engine[7]/throttle</property>
97    <offset type="double">-1.0</offset>
98    <factor type="double">-0.5</factor>
99   </binding>
100  </axis>
101
102  <axis n="3">
103   <desc>Rudder</desc>
104   <binding><command>null</command></binding>
105   <interval-sec type="double">0.02</interval-sec>
106   <low>
107    <repeatable type="bool">true</repeatable>
108    <binding>
109     <command>property-adjust</command>
110     <property>/controls/flight/rudder</property>
111     <step type="double">-0.02</step>
112    </binding>
113   </low>
114   <high>
115    <repeatable type="bool">true</repeatable>
116    <binding>
117     <command>property-adjust</command>
118     <property>/controls/flight/rudder</property>
119     <step type="double">0.02</step>
120    </binding>
121   </high>
122  </axis>
123
124  <axis n="4">
125   <desc>Elevator trim</desc>
126   <binding><command>null</command></binding>
127   <interval-sec type="double">0.02</interval-sec>
128   <low>
129    <repeatable type="bool">true</repeatable>
130    <binding>
131     <command>property-adjust</command>
132     <property>/controls/flight/elevator-trim</property>
133     <step type="double">0.001</step>
134    </binding>
135   </low>
136   <high>
137    <repeatable type="bool">true</repeatable>
138    <binding>
139     <command>property-adjust</command>
140     <property>/controls/flight/elevator-trim</property>
141     <step type="double">-0.001</step>
142    </binding>
143   </high>
144  </axis>
145
146  <button n="0">
147   <desc>Brakes</desc>
148   <binding>
149    <command>property-assign</command>
150    <property>/controls/gear/wheel[0]/brake</property>
151    <value type="double">1.0</value>
152   </binding>
153   <binding>
154    <command>property-assign</command>
155    <property>/controls/gear/wheel[1]/brake</property>
156    <value type="double">1.0</value>
157   </binding>
158   <binding>
159    <command>property-assign</command>
160    <property>/controls/gear/wheel[2]/brake</property>
161    <value type="double">1.0</value>
162   </binding>
163   <mod-up>
164    <binding>
165     <command>property-assign</command>
166     <property>/controls/gear/wheel[0]/brake</property>
167     <value type="double">0.0</value>
168    </binding>
169    <binding>
170     <command>property-assign</command>
171     <property>/controls/gear/wheel[1]/brake</property>
172     <value type="double">0.0</value>
173    </binding>
174    <binding>
175     <command>property-assign</command>
176     <property>/controls/gear/wheel[2]/brake</property>
177     <value type="double">0.0</value>
178    </binding>
179   </mod-up>
180  </button>
181
182  <button n="1">
183   <binding>
184    <desc>Center rudder</desc>
185    <command>property-assign</command>
186    <property>/controls/flight/rudder</property>
187    <value type="double">0.0</value>
188   </binding>
189  </button>
190
191  <button n="2">
192   <binding>
193    <desc>Flaps up</desc>
194    <command>property-adjust</command>
195    <property>/controls/flight/flaps</property>
196    <step type="double">-0.34</step>
197   </binding>
198  </button>
199
200  <button n="3">
201   <binding>
202    <desc>Flaps down</desc>
203    <command>property-adjust</command>
204    <property>/controls/flight/flaps</property>
205    <step type="double">0.34</step>
206   </binding>
207  </button>
208
209 </PropertyList>
210
211 <!-- end of X8-30.xml -->