Debian Codegraph @

Input/Joysticks/Saitek/Cyborg-Evo.xml

raw symbols SCIP
1 <!--
2 Joystick binding definitions for "Saitek Cyborg Evo" Joystick.
3 aitek Cyborg USB Stick
4 This file borrows heavily from "Cyborg-Gold-3d-USB.xml"
5
6 The Saitek Cyborg Evo is designed to be easily switchable between a
7 left-handed or right handed person. With that in mind {^, F1, F2} buttons
8 on the left, and {^, F3, F4 } buttons on the right have repeated
9 functionality as the 'modifier' buttons.
10
11 Axis # (direction) mapped to
12 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13 axis 0: (left-right) aileron
14 axis 1: (forward-backward) elevator
15 axis 2: (slider) throttle
16 axis 3: (twist) rudder
17
18 ~~~~ Left Side Modifiers ~~~~
19 button 10: "^" Modifier 1
20 button 6: "F1" Modifier 2
21 button 7: "F2" Modifier 3
22
23 ~~~~ Right Side Modifiers ~~~~
24 button 11: "^" Modifier 1
25 button 8: "F3" Modifier 2
26 button 9: "F4" Modifier 3
27
28 Button # (location) No Mod Mod 1 Mod 2 Mod 3
29 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 button 0: (trigger) Brakes Parking Brake Speed Brake Thrust Reverse
31 button 1: (middle) Reset View Reset All Trim Cockpit View Tail Wheel Lock
32 button 2: (left) Flaps Up Gear Up Zoom In #
33 button 3: (right) Flaps Down Gear Down Zoom Out #
34 button 4: (left of hat) Previous View Trim Rudder # #
35 button 5: (right of hat) Next View Trim Rudder # #
36
37 axis 4: (hat left-right) look l/r Trim Aileron Adj Mixture #
38 axis 5: (hat up-down) look u/d Trim Elevator Adj Propeller #
39
40 -->
41
42 <PropertyList>
43
44 <name>Saitek Cyborg USB Stick</name>
45 <name>Saitek Cyborg Evo</name>
46 <name>Saitek Cyborg evo Wireless</name>
47 <name>Saitek Cyborg Evo Force</name>
48
49 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~ Axis Bindings ~~~~~~~~~~~~~~~~~~~~~~~~ -->
50
51 <axis n="0">
52 <desc>Aileron</desc>
53 <binding>
54 <command>property-scale</command>
55 <property>/controls/flight/aileron</property>
56 <power type="double">2</power>
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">-1.0</factor>
66 <power type="double">2</power>
67 </binding>
68 </axis>
69
70 <axis>
71 <number>
72 <mac>3</mac>
73 <unix>2</unix>
74 <windows>2</windows>
75 </number>
76 <desc>Throttle</desc>
77 <binding>
78 <command>nasal</command>
79 <script>controls.throttleAxis()</script>
80 </binding>
81 </axis>
82
83 <axis>
84 <number>
85 <mac>2</mac>
86 <unix>3</unix>
87 <windows>3</windows>
88 </number>
89 <desc>Rudder</desc>
90 <binding>
91 <command>property-scale</command>
92 <property>/controls/flight/rudder</property>
93 <power type="double">2</power>
94 </binding>
95 </axis>
96
97 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~ Hat Switch ~~~~~~~~~~~~~~~~~~~~~~~~ -->
98 <axis>
99 <desc>View Direction; Aileron Trim;</desc>
100 <number>
101 <unix>4</unix>
102 <mac>4</mac>
103 <windows>6</windows>
104 </number>
105 <low>
106 <repeatable>true</repeatable>
107 <binding>
108 <command>nasal</command>
109 <script>
110 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
111 if (mod == nil or mod == 0) {
112 v = getprop("/sim/current-view/view-number");
113 if (v == 0 or v == 4) {
114 view.panViewDir(2);
115 } else {
116 view.panViewDir(2);
117 }
118 } elsif (mod == 1) {
119 controls.aileronTrim(-0.75);
120 } elsif (mod == 2) {
121 controls.adjMixture(-2);
122 } elsif (mod == 3) {
123 #
124 }
125 </script>
126 </binding>
127 </low>
128 <high>
129 <repeatable>true</repeatable>
130 <binding>
131 <command>nasal</command>
132 <script>
133 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
134 if (mod == nil or mod == 0) {
135 v = getprop("/sim/current-view/view-number");
136 if (v == 0 or v == 4) {
137 view.panViewDir(-2);
138 } else {
139 view.panViewDir(-2);
140 }
141 } elsif (mod == 1) {
142 controls.aileronTrim(0.75);
143 } elsif (mod == 2) {
144 controls.adjMixture(2);
145 } elsif (mod == 3) {
146 #
147 }
148 </script>
149 </binding>
150 </high>
151 </axis>
152
153 <axis>
154 <desc>View Elevation; Elevator Trim;</desc>
155 <number>
156 <unix>5</unix>
157 <mac>5</mac>
158 <windows>7</windows>
159 </number>
160 <low>
161 <repeatable>true</repeatable>
162 <binding>
163 <command>nasal</command>
164 <script>
165 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
166 if (mod == nil or mod == 0) {
167 view.panViewPitch(2);
168 } elsif (mod == 1) {
169 controls.elevatorTrim(0.75);
170 } elsif (mod == 2) {
171 controls.adjPropeller(1);
172 } elsif (mod == 3) {
173 #
174 }
175 </script>
176 </binding>
177 </low>
178 <high>
179 <repeatable>true</repeatable>
180 <binding>
181 <command>nasal</command>
182 <script>
183 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
184 if (mod == nil or mod == 0) {
185 view.panViewPitch(-2);
186 } elsif (mod == 1) {
187 controls.elevatorTrim(-0.75);
188 } elsif (mod == 2) {
189 controls.adjPropeller(-1);
190 } elsif (mod == 3) {
191 #
192 }
193 </script>
194 </binding>
195 </high>
196 </axis>
197
198
199 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~ Button Bindings ~~~~~~~~~~~~~~~~~~~~~~~~ -->
200
201 <!-- Trigger Button - Brakes, Parking Brake, Thrust Reverser -->
202 <button n="0">
203 <desc>Brakes</desc>
204 <repeatable type="bool">true</repeatable>
205 <binding>
206 <command>nasal</command>
207 <script>
208 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
209 if (mod == nil or mod == 0) {
210 interpolate("/controls/gear/brake-left", 1, 0.075);
211 interpolate("/controls/gear/brake-right", 1, 0.075);
212 } elsif (mod == 1) {
213 setprop("/controls/gear/brake-left", 1);
214 setprop("/controls/gear/brake-right", 1);
215 } elsif (mod == 2) {
216 #
217 } elsif (mod == 3) {
218 #
219 }
220 </script>
221 </binding>
222 <mod-up>
223 <repeatable type="bool">true</repeatable>
224 <binding>
225 <command>nasal</command>
226 <script>
227 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
228 if (mod == nil or mod == 0) {
229 interpolate("/controls/gear/brake-left", 0, 0.075);
230 interpolate("/controls/gear/brake-right", 0, 0.075);
231 } elsif (mod == 1) {
232 brake = !getprop("/controls/gear/brake-parking");
233 setprop("/controls/gear/brake-parking", brake);
234 if (brake) {
235 gui.popupTip("Parking Brake ON");
236 } else {
237 gui.popupTip("Parking Brake OFF");
238 }
239 setprop("/controls/gear/brake-left", 0);
240 setprop("/controls/gear/brake-right", 0);
241 } elsif (mod == 2) {
242 speedbrake = !getprop("/controls/flight/speedbrake");
243 setprop("/controls/flight/speedbrake", speedbrake);
244 } elsif (mod == 3) {
245 reverser = !getprop("/controls/engines/engine[0]/reverser");
246 props.setAll("/controls/engines/engine", "reverser", reverser);
247 if (reverser) {
248 gui.popupTip("Thrust Reverser ON");
249 } else {
250 gui.popupTip("Thrust Reverser OFF");
251 }
252 }
253 </script>
254 </binding>
255 </mod-up>
256 </button>
257
258 <!-- Middle Button below Hat-switch, labeled "2" -->
259 <button>
260 <desc>Reset view; toggle tail-wheel lock; reset trim</desc>
261 <number>
262 <unix>1</unix>
263 <mac>1</mac>
264 <windows>1</windows>
265 </number>
266 <repeatable type="bool">false</repeatable>
267 <binding>
268 <command>nasal</command>
269 <script>
270 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
271 if (mod == nil or mod == 0) {
272 view.resetView();
273 } elsif (mod == 1) {
274 setprop("/controls/flight/elevator-trim", 0);
275 setprop("/controls/flight/aileron-trim", 0);
276 setprop("/controls/flight/rudder-trim", 0);
277 } elsif (mod == 2) {
278 setprop("/sim/current-view/view-number", 0);
279 view.resetView();
280 } elsif (mod == 3) {
281 twlock = !getprop("/controls/gear/tailwheel-lock");
282 setprop("/controls/gear/tailwheel-lock", twlock);
283 if (twlock) {
284 gui.popupTip("Tail Wheel LOCKED");
285 } else {
286 gui.popupTip("Tail Wheel UNLOCKED");
287 }
288 }
289 </script>
290 </binding>
291 </button>
292
293 <!-- Left Button below Hat-switch, labeled "3" -->
294 <button n="2">
295 <desc>Flaps Up; Gear up</desc>
296 <repeatable type="bool">false</repeatable>
297 <binding>
298 <command>nasal</command>
299 <script>
300 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
301 if (mod == nil or mod == 0) {
302 controls.flapsDown(-1);
303 } elsif (mod == 1) {
304 controls.gearDown(-1);
305 } elsif (mod == 2) {
306 view.increase();
307 } elsif (mod == 3) {
308 #
309 }
310 </script>
311 </binding>
312 <mod-up>
313 <binding>
314 <command>nasal</command>
315 <script>
316 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
317 if (mod == nil or mod == 0) {
318 controls.flapsDown(0);
319 } elsif (mod == 1) {
320 controls.gearDown(0);
321 } elsif (mod == 2) {
322 #
323 } elsif (mod == 3) {
324 #
325 }
326 </script>
327 </binding>
328 </mod-up>
329 </button>
330
331 <!-- Right Button below Hat-switch, labeled "4" -->
332 <button n="3"><!-- right -->
333 <desc>Flaps Down; Gear down</desc>
334 <repeatable type="bool">false</repeatable>
335 <binding>
336 <command>nasal</command>
337 <script>
338 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
339 if (mod == nil or mod == 0) {
340 controls.flapsDown(1);
341 } elsif (mod == 1) {
342 controls.gearDown(1);
343 } elsif (mod == 2) {
344 view.decrease();
345 } elsif (mod == 3) {
346 #
347 }
348 </script>
349 </binding>
350 <mod-up>
351 <binding>
352 <command>nasal</command>
353 <script>
354 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
355 if (mod == nil or mod == 0) {
356 controls.flapsDown(0);
357 } elsif (mod == 1) {
358 controls.gearDown(0);
359 } elsif (mod == 2) {
360 #
361 } elsif (mod == 3) {
362 #
363 }
364 </script>
365 </binding>
366 </mod-up>
367 </button>
368
369 <!-- Button left of Hat switch, Labeled '5' -->
370 <button n="4">
371 <desc>Previous View</desc>
372 <repeatable type="bool">false</repeatable>
373 <binding>
374 <command>nasal</command>
375 <script>
376 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
377 if (mod == nil or mod == 0) {
378 view.stepView(-1);
379 } elsif (mod == 1) {
380 controls.rudderTrim(-0.75);
381 } elsif (mod == 2) {
382 #
383 } elsif (mod == 3) {
384 #
385 }
386 </script>
387 </binding>
388 </button>
389
390 <!-- Button right of Hat switch, Labeled '6' -->
391 <button n="5">
392 <desc>Next View</desc>
393 <repeatable type="bool">false</repeatable>
394 <binding>
395 <command>nasal</command>
396 <script>
397 mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
398 if (mod == nil or mod == 0) {
399 view.stepView(1);
400 } elsif (mod == 1) {
401 controls.rudderTrim(0.75);
402 } elsif (mod == 2) {
403 #
404 } elsif (mod == 3) {
405 #
406 }
407 </script>
408 </binding>
409 </button>
410
411 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~ Modifier Buttons ~~~~~~~~~~~~~~~~~~~~~~~~ -->
412
413 <!-- Left Side Button labeled ^ -->
414 <button n="10">
415 <desc>Modifier 1</desc>
416 <repeatable type="bool">false</repeatable>
417 <binding>
418 <command>nasal</command>
419 <script>
420 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
421 setprop(name, 1);
422 </script>
423 </binding>
424 <mod-up>
425 <binding>
426 <command>nasal</command>
427 <script>
428 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
429 setprop(name, 0);
430 </script>
431 </binding>
432 </mod-up>
433 </button>
434
435 <!-- Left Side Button labeled F1 -->
436 <button n="6">
437 <desc>Modifier 2</desc>
438 <repeatable type="bool">false</repeatable>
439 <binding>
440 <command>nasal</command>
441 <script>
442 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
443 setprop(name, 2);
444 </script>
445 </binding>
446 <mod-up>
447 <binding>
448 <command>nasal</command>
449 <script>
450 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
451 setprop(name, 0);
452 </script>
453 </binding>
454 </mod-up>
455 </button>
456
457 <!-- Left Side Button labeled F2 -->
458 <button n="7">
459 <desc>Modifier 3</desc>
460 <repeatable type="bool">false</repeatable>
461 <binding>
462 <command>nasal</command>
463 <script>
464 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
465 setprop(name, 3);
466 </script>
467 </binding>
468 <mod-up>
469 <binding>
470 <command>nasal</command>
471 <script>
472 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
473 setprop(name, 0);
474 </script>
475 </binding>
476 </mod-up>
477 </button>
478
479 <!-- Right Side Button labeled ^ -->
480 <button n="11">
481 <desc>Modifier 1</desc>
482 <repeatable type="bool">false</repeatable>
483 <binding>
484 <command>nasal</command>
485 <script>
486 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
487 setprop(name, 1);
488 </script>
489 </binding>
490 <mod-up>
491 <binding>
492 <command>nasal</command>
493 <script>
494 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
495 setprop(name, 0);
496 </script>
497 </binding>
498 </mod-up>
499 </button>
500
501 <!-- Right Side Button labeled F3 -->
502 <button n="8">
503 <desc>Modifier 2</desc>
504 <repeatable type="bool">false</repeatable>
505 <binding>
506 <command>nasal</command>
507 <script>
508 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
509 setprop(name, 2);
510 </script>
511 </binding>
512 <mod-up>
513 <binding>
514 <command>nasal</command>
515 <script>
516 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
517 setprop(name, 0);
518 </script>
519 </binding>
520 </mod-up>
521 </button>
522
523 <!-- Right Side Button labeled F4 -->
524 <button n="9">
525 <desc>Modifier 3</desc>
526 <repeatable type="bool">false</repeatable>
527 <binding>
528 <command>nasal</command>
529 <script>
530 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
531 setprop(name, 3);
532 </script>
533 </binding>
534 <mod-up>
535 <binding>
536 <command>nasal</command>
537 <script>
538 name = "/input/joysticks/js[0]/saitek-cyborg-evo-modifier";
539 setprop(name, 0);
540 </script>
541 </binding>
542 </mod-up>
543 </button>
544
545 </PropertyList>