Debian Codegraph @

Input/Joysticks/SpeedLink/black-widow.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2 <!--
3 Joystick Definition for Speed-Link SL-6640 "Black Widow"
4 http://www.speed-link.com/?p=2&cat=313&pid=1533&paus=1
5 4-Axis, 8 Buttons, 8-way Coolie-Hat, Force-Feedback-Vibration (not in FG yet)
6
7 My definitions:
8 type W# U# M# assign
9 ##################################
10 Axis 0 0 ? ailerons
11 Axis 1 1 ? elevator
12 Axis 2 2 ? throttle
13 Axis 3 3 ? rudder
14 Axis 6 4 ? horizantal view direction
15 Axis 7 5 ? vertical view direction
16 Btn 0 0 ? Reset View
17 Btn 1 1 ? Gear Up/Down
18 Btn 2 2 ? Flaps Up
19 Btn 3 3 ? Flaps Down
20 Btn 4 4 ? Thrust Reverser
21 Btn 5 5 ? Speed Brakes
22 Btn 6 6 ? Elevator Trim Backward
23 Btn 7 7 ? Elevator Trim Forward
24
25 Notes, Todo and Addendum:
26 - Pressing a button will bring up the gui.popupTip for the representing function
27 - Addionally Buttons 2 and 3 (Flaps Up/Down) and Buttons 6 and 7 (Elevator Trim Up/Down) returns a value on screen telling the actual chosen settings
28 - Button- and Axis-assignment respect the use of civil planes. e.g. Button 0 (aka "Fire Trigger" is resetting actual view instead of fiering off a weapon) and Button 1 is reprensenting Gear Up/Down instead of alternate weapon
29 - Numbering of axes and buttons for Apple mac not verified
30 - Numbering of Buttons 6 and 7 respect how Windows Vista x64 (german) sees the Stick. In Ubuntu (9.04) Buttons 6 and 7 must be renumbered to 4 and 5.
31 - Created and (mainly) tested in MS Windows Vista Home premium x64 (german)
32 - Name-entries respect the lack of Vista (german) to present the correct joystick-name as desired for FGFS
33 - Representing also the jostick-name as provided in Windows-internal registry entry
34 - Actually only wheel[0] (most times the nose wheel) is checked for pressure / ground contact (=./gear/gear[0]/wow). In this case retraction of gear is not allowed
35 So technically on aircraft with multiple axis (e.g. nose wheel plus wing wheels) can retract the gear as soon as the nose wheel is up but wing wheels are still on ground ;)
36 - Feel free to remove the lines starting with "gui.popupTip..." if you are annoyed by the messages within FG ;)
37
38 Brought to you by Mike Nieber (Callsign: D-SKY1) (c) 2009
39 This file is released under the GPL license v2 or later.
40 $Id$
41 -->
42
43 <PropertyList>
44 <!--<name type="string">Microsoft-PC-Joysticktreiber</name>-->
45 <name type="string">Mega World USB Game Controllers</name>
46 <name type="string">SpeedLink SL-6640 Black Widow Flight Stick</name>
47 <name type="string">SL-6640 Black Widow Flightstick</name>
48 <name type="string">SL-6640-SBK BLACK WIDOW Flightstick</name>
49 <axis>
50 <desc type="string">Aileron</desc>
51 <number>
52 <windows>0</windows>
53 <mac>0</mac>
54 <unix>0</unix>
55 </number>
56 <binding>
57 <command>property-scale</command>
58 <property>/controls/flight/aileron</property>
59 <offset type="double">0.0</offset>
60 <factor type="double">1.0</factor>
61 <dead-band type="double">0.02</dead-band>
62 </binding>
63 </axis>
64 <axis>
65 <desc type="string">Elevator</desc>
66 <number>
67 <windows>1</windows>
68 <mac>1</mac>
69 <unix>1</unix>
70 </number>
71 <binding>
72 <command>property-scale</command>
73 <property>/controls/flight/elevator</property>
74 <offset type="double">0.0</offset>
75 <factor type="double">-1.0</factor>
76 <dead-band type="double">0.02</dead-band>
77 </binding>
78 </axis>
79 <axis>
80 <desc type="string">Throttle</desc>
81 <number>
82 <windows>2</windows>
83 <mac>2</mac>
84 <unix>2</unix>
85 </number>
86 <binding>
87 <command>nasal</command>
88 <script>controls.throttleAxis()</script>
89 </binding>
90 </axis>
91 <axis>
92 <desc type="string">Rudder</desc>
93 <number>
94 <windows>3</windows>
95 <mac>3</mac>
96 <unix>3</unix>
97 </number>
98 <binding>
99 <command>property-scale</command>
100 <property>/controls/flight/rudder</property>
101 <offset type="double">0.0</offset>
102 <factor type="double">1.0</factor>
103 <dead-band type="double">0.02</dead-band>
104 </binding>
105 </axis>
106 <axis>
107 <desc type="string">View Direction</desc>
108 <number>
109 <windows>6</windows>
110 <mac>6</mac>
111 <unix>6</unix>
112 </number>
113 <low>
114 <repeatable type="bool">true</repeatable>
115 <binding>
116 <command>nasal</command>
117 <script>
118 <![CDATA[
119 view.panViewDir(1);
120 ]]>
121 </script>
122 </binding>
123 </low>
124 <high>
125 <repeatable type="bool">true</repeatable>
126 <binding>
127 <command>nasal</command>
128 <script>
129 <![CDATA[
130 view.panViewDir(-1);
131 ]]>
132 </script>
133 </binding>
134 </high>
135 </axis>
136 <axis>
137 <desc type="string">View Elevation</desc>
138 <number>
139 <windows>7</windows>
140 <mac>7</mac>
141 <unix>7</unix>
142 </number>
143 <low>
144 <repeatable type="bool">true</repeatable>
145 <binding>
146 <command>nasal</command>
147 <script>
148 <![CDATA[
149 view.panViewPitch(-1);
150 ]]>
151 </script>
152 </binding>
153 </low>
154 <high>
155 <repeatable type="bool">true</repeatable>
156 <binding>
157 <command>nasal</command>
158 <script>
159 <![CDATA[
160 view.panViewPitch(1);
161 ]]>
162 </script>
163 </binding>
164 </high>
165 </axis>
166 <button n="0">
167 <desc type="string">Reset View</desc>
168 <binding>
169 <command>nasal</command>
170 <script>
171 <![CDATA[
172 view.resetView();
173 gui.popupTip("View Reset!");
174 ]]>
175 </script>
176 </binding>
177 </button>
178 <button n="1">
179 <desc type="string">Gear</desc>
180 <binding>
181 <command>nasal</command>
182 <script>
183 <![CDATA[
184 var wowprop = getprop("/gear/gear[0]/wow");
185 var gearprop = getprop("/controls/gear/gear-down");
186 if (wowprop) {
187 if (gearprop) {
188 gui.popupTip("No service on ground!");
189 } else {
190 gui.popupTip("Call ground service for plane repair ;) !");
191 }
192 } else {
193 if (gearprop) {
194 controls.gearDown(-1);
195 gui.popupTip("Gear UP!");
196 } else {
197 controls.gearDown(1);
198 gui.popupTip("Gear DOWN!");
199 }
200 }
201 ]]>
202 </script>
203 </binding>
204 <mod-up>
205 <binding>
206 <command>nasal</command>
207 <script>
208 <![CDATA[
209 controls.gearDown(0);
210 ]]>
211 </script>
212 </binding>
213 </mod-up>
214 </button>
215 <button n="2">
216 <desc type="string">Flaps Up</desc>
217 <repeatable type="bool">false</repeatable>
218 <binding>
219 <command>nasal</command>
220 <script>
221 <![CDATA[
222 controls.flapsDown(-1);
223 var flapsprop = getprop("/controls/flight/flaps");
224 if ( flapsprop == 1 ) {
225 gui.popupTip("Flaps full extracted!");
226 } elsif ( flapsprop == 0 ) {
227 gui.popupTip("Flaps full up!");
228 } else {
229 gui.popupTip(sprintf("Flaps at %i degrees", 100 * flapsprop));
230 }
231 ]]>
232 </script>
233 </binding>
234 <mod-up>
235 <binding>
236 <command>nasal</command>
237 <script>
238 <![CDATA[
239 controls.flapsDown(0);
240 ]]>
241 </script>
242 </binding>
243 </mod-up>
244 </button>
245 <button n="3">
246 <desc type="string">Flaps Down</desc>
247 <repeatable type="bool">false</repeatable>
248 <binding>
249 <command>nasal</command>
250 <script>
251 <![CDATA[
252 controls.flapsDown(1);
253 var flapsprop = getprop("/controls/flight/flaps");
254 if ( flapsprop == 1 ) {
255 gui.popupTip("Flaps full extracted!");
256 } elsif ( flapsprop == 0 ) {
257 gui.popupTip("Flaps full up!");
258 } else {
259 gui.popupTip(sprintf("Flaps at %i degrees", 100 * flapsprop));
260 }
261 ]]>
262 </script>
263 </binding>
264 <mod-up>
265 <binding>
266 <command>nasal</command>
267 <script>
268 <![CDATA[
269 controls.flapsDown(0);
270 ]]>
271 </script>
272 </binding>
273 </mod-up>
274 </button>
275 <button n="4">
276 <desc type="string">Thrust reverse</desc>
277 <binding>
278 <command>nasal</command>
279 <script>
280 <![CDATA[
281 var i = !getprop("/controls/engines/engine[0]/reverser");
282 props.setAll("/controls/engines/engine", "reverser", i);
283 gui.popupTip("Thrust Reverser " ~ (i ? "ON!" : "OFF!"));
284 ]]>
285 </script>
286 </binding>
287 </button>
288 <button n="5">
289 <desc type="string">Speed Brake</desc>
290 <repeatable type="bool">false</repeatable>
291 <binding>
292 <command>nasal</command>
293 <script>
294 <![CDATA[
295 var i = !getprop("/controls/flight/speedbrake");
296 setprop("/controls/flight/speedbrake", i);
297 gui.popupTip("Speed Brake " ~ (i ? "ON!" : "OFF!"));
298 ]]>
299 </script>
300 </binding>
301 </button>
302 <button n="6">
303 <desc type="string">Elevator Trim Down</desc>
304 <repeatable type="bool">true</repeatable>
305 <binding>
306 <command>nasal</command>
307 <script>
308 <![CDATA[
309 var vertrim = getprop("/controls/flight/elevator-trim");
310 controls.elevatorTrim(-0.1);
311 gui.popupTip(sprintf("Elevator Trim Down: %i", 1000 * vertrim));
312 ]]>
313 </script>
314 </binding>
315 <mod-up>
316 <binding>
317 <command>nasal</command>
318 <script>
319 <![CDATA[
320 controls.elevatorTrim(0);
321 ]]>
322 </script>
323 </binding>
324 </mod-up>
325 </button>
326 <button n="7">
327 <desc type="string">Elevator Trim Up</desc>
328 <repeatable type="bool">true</repeatable>
329 <binding>
330 <command>nasal</command>
331 <script>
332 <![CDATA[
333 var vertrim = getprop("/controls/flight/elevator-trim");
334 controls.elevatorTrim(0.1);
335 gui.popupTip(sprintf("Elevator Trim Up: %i", 1000 * vertrim));
336 ]]>
337 </script>
338 </binding>
339 <mod-up>
340 <binding>
341 <command>nasal</command>
342 <script>
343 <![CDATA[
344 controls.elevatorTrim(0);
345 ]]>
346 </script>
347 </binding>
348 </mod-up>
349 </button>
350 </PropertyList>