Debian Codegraph @

Input/Joysticks/SpeedLink/ps2.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2 <!--
3 ************************************************************************
4 * Bindings for Sony Playstation 2 DualShock Analog Controller (SCPH-1200)
5 * connected via Speedlink PS2 to PC adapter SL6502
6 * (USB hardware id: 0e8f:0003, as of linux kernel 2.6.2x)
7 * http://www.speedlink.com/?p=2&cat=319&pid=20205&paus=1
8 * (working link as of 29.10.2010)
9 *
10 * Tested under Linux and Windows XP (32bit)
11 *
12 * Axis 0 (left joystick): ailerons
13 * Axis 1 (left joystick): elevator
14 * Axis 2: not used, or we won't have a stable rudder
15 * Axis 3 (right joystick): rudder
16 * Axes 4 and 5 (d-pad): view direction (6 and 7 respectively under Windows)
17 * NOTE to Windows users: axis 7 is inverted and currently there is
18 * no way to fix it per OS basis.
19 *
20 * Buttons according to the gamepad:
21 *
22 * Button 3 (square): throttle up
23 * Button 2 (cross): throttle down
24 * Button 1 (circle): flap down
25 * Button 0 (triangle): flap up
26 * Button 6 (L1): elevator trim up
27 * Button 7 (R1): elevator trim down
28 * Button 4 (L2): left brake only
29 * Button 5 (R2): right brake only
30 * Button 9 (start): gear toggle
31 * Button 8 (select): currently unused
32 * Button 10 (left joystick button): view change
33 * Button 11 (right joystick button): parking brake toggle
34
35 ************************************************************************
36 -->
37
38 <PropertyList>
39 <name>GreenAsia Inc. USB Joystick </name>
40 <name>USB Joystick </name>
41 <name>SPEED-LINK DUAL SHOCK ADAPTER</name>
42
43 <nasal>
44 <script>
45 gui.popupTip("Enable analog mode!", 10);
46 </script>
47 </nasal>
48
49 <axis n="0">
50 <desc>Aileron</desc>
51 <binding>
52 <command>property-scale</command>
53 <property>/controls/flight/aileron</property>
54 <factor type="double">0.6</factor>
55 <squared type="bool">true</squared>
56 <dead-band type="double">0.2</dead-band>
57 </binding>
58 </axis>
59
60 <axis n="1">
61 <desc>Elevator</desc>
62 <binding>
63 <command>property-scale</command>
64 <property>/controls/flight/elevator</property>
65 <factor type="double">-0.6</factor>
66 <squared type="bool">true</squared>
67 <dead-band type="double">0.2</dead-band>
68 </binding>
69 </axis>
70
71 # <axis n="3">
72 # <desc>Rudder</desc>
73 # <binding>
74 # <command>property-scale</command>
75 # <property>/controls/flight/rudder</property>
76 # <factor type="double">0.5</factor>
77 # </binding>
78 # </axis>
79
80 <axis>
81 <desc>View direction</desc>
82 <number>
83 <windows>6</windows>
84 <unix>4</unix>
85 </number>
86 <low>
87 <repeatable>true</repeatable>
88 <binding>
89 <command>property-adjust</command>
90 <property>/sim/current-view/goal-heading-offset-deg</property>
91 <step type="double">2.0</step>
92 </binding>
93 </low>
94 <high>
95 <repeatable>true</repeatable>
96 <binding>
97 <command>property-adjust</command>
98 <property>/sim/current-view/goal-heading-offset-deg</property>
99 <step type="double">-2.0</step>
100 </binding>
101 </high>
102 </axis>
103
104 <axis>
105 <desc>View elevation</desc>
106 <number>
107 <windows>7</windows>
108 <unix>5</unix>
109 </number>
110 <low>
111 <repeatable>true</repeatable>
112 <binding>
113 <command>property-adjust</command>
114 <property>/sim/current-view/goal-pitch-offset-deg</property>
115 <step type="double">2.0</step>
116 </binding>
117 </low>
118 <high>
119 <repeatable>true</repeatable>
120 <binding>
121 <command>property-adjust</command>
122 <property>/sim/current-view/goal-pitch-offset-deg</property>
123 <step type="double">-2.0</step>
124 </binding>
125 </high>
126 </axis>
127
128 <button n="6">
129 <desc>Elevator trim up</desc>
130 <repeatable type="bool">true</repeatable>
131 <binding>
132 <command>property-adjust</command>
133 <property>/controls/flight/elevator-trim</property>
134 <step type="double">0.001</step>
135 </binding>
136 </button>
137
138 <button n="7">
139 <desc>Elevator trim down</desc>
140 <repeatable type="bool">true</repeatable>
141 <binding>
142 <command>property-adjust</command>
143 <property>/controls/flight/elevator-trim</property>
144 <step type="double">-0.001</step>
145 </binding>
146 </button>
147
148 <button n="0">
149 <desc>Flaps up</desc>
150 <repeatable>false</repeatable>
151 <binding>
152 <command>nasal</command>
153 <script>controls.flapsDown(-1)</script>
154 </binding>
155 <mod-up>
156 <binding>
157 <command>nasal</command>
158 <script>controls.flapsDown(0)</script>
159 </binding>
160 </mod-up>
161 </button>
162
163 <button n="1">
164 <desc>Flaps down</desc>
165 <binding>
166 <command>nasal</command>
167 <script>controls.flapsDown(1)</script>
168 </binding>
169 <mod-up>
170 <binding>
171 <command>nasal</command>
172 <script>controls.flapsDown(0)</script>
173 </binding>
174 </mod-up>
175 </button>
176
177 <button n="4">
178 <desc>Left brake</desc>
179 <binding>
180 <command>nasal</command>
181 <script>controls.applyBrakes(1,-1)</script>
182 </binding>
183 <mod-up>
184 <binding>
185 <command>nasal</command>
186 <script>controls.applyBrakes(0, -1)</script>
187 </binding>
188 </mod-up>
189 </button>
190
191 <button n="5">
192 <desc>Right brake</desc>
193 <binding>
194 <command>nasal</command>
195 <script>controls.applyBrakes(1,1)</script>
196 </binding>
197 <mod-up>
198 <binding>
199 <command>nasal</command>
200 <script>controls.applyBrakes(0, 1)</script>
201 </binding>
202 </mod-up>
203 </button>
204
205 <button n="9">
206 <desc>Landing gear toggle</desc>
207 <repeatable>false</repeatable>
208 <binding>
209 <command>nasal</command>
210 <script>controls.gearToggle()</script>
211 </binding>
212 </button>
213
214 <button n="3">
215 <desc>Throttle up</desc>
216 <repeatable>true</repeatable>
217 <binding>
218 <command>nasal</command>
219 <script>_ = sprintf("Throttle = %.3f", controls.adjThrottle(0.5))</script>
220 </binding>
221 </button>
222
223 <button n="2">
224 <desc>Throttle down</desc>
225 <repeatable>true</repeatable>
226 <binding>
227 <command>nasal</command>
228 <script>_ = sprintf("Throttle = %.3f", controls.adjThrottle(-0.5))</script>
229 </binding>
230 </button>
231
232 <button n="8">
233 <desc>Not used</desc>
234 <repeatable>false</repeatable>
235 <binding>
236 </binding>
237 </button>
238
239 <button n="10">
240 <desc>View</desc>
241 <repeatable>false</repeatable>
242 <binding>
243 <command>nasal</command>
244 <script>view.stepView(1)</script>
245 </binding>
246 </button>
247
248 <button n="11">
249 <desc>Parking brake toggle</desc>
250 <repeatable>false</repeatable>
251 <binding>
252 <command>property-toggle</command>
253 <property>/controls/gear/brake-parking</property>
254 </binding>
255 </button>
256 </PropertyList>