Debian Codegraph @

Input/Event/HoneycombAeronautical/Honeycomb-Aeronautical-Alpha-Flight-Controls.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <!--
4
5 Copyright (c) 2021 FlightGear Flight Simulator
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 -->
20
21
22 <!--
23 ********************************************************************
24 *
25 * Bindings for Honeycomb Aeronautical Alpha Flight Controls - Yoke
26 *
27 *
28 * Axis 0: ailerons
29 * Axis 1: elevator
30 * Axes 2 and 3 (hat): view direction
31 *
32 * Button 0: button-trigger YOKE white-Trigger left-handle AP disconnect
33 * Button 1: button-thumb YOKE white-top-Button left-handle PTT
34 * Button 2: button-thumb2 YOKE white-top-Button right-handle View, Reset
35 * Button 3: button-top YOKE red-top-Button right-handle
36 * Button 4: button-top2 YOKE outer-Rocker down left-handle Elevator Trim, Up
37 * Button 5: button-pinkie YOKE outer-Rocker up left-handle Elevator Trim, Down
38 * Button 6: button-base YOKE inner-Rocker down left-handle View, zoom out
39 * Button 7: button-base2 YOKE inner-Rocker up left-handle View, zoom in
40 * Button 8: button-base3 YOKE top-Rocker inward right-handle Aileron Trim, Left
41 * Button 9: button-base4 YOKE top-Rocker outward right-handle Aileron Trim, Right
42 * Button 10: button-base5 YOKE bottom-Rocker inward right-handle Rudder Trim, Right
43 * Button 11: button-base6 YOKE bottom-Rocker outward right-handle Rudder Trim, Right
44 * Button 12: button-300 BASE Master Alternator up
45 * Button 13: button-301 BASE Master Alternator down
46 * Button 14: button-302 BASE Master Battery up
47 * Button 15: button-dead BASE Master Battery down
48 * Button 16: button-704 BASE Avionics Bus1 up
49 * Button 17: button-705 BASE Avionics Bus1 down
50 * Button 18: button-706 BASE Avionics Bus2 up
51 * Button 19: button-707 BASE Avionics Bus2 down
52 * Button 20: button-708 BASE Beacon up
53 * Button 21: button-709 BASE Beacon down
54 * Button 22: button-710 BASE Land up
55 * Button 23: button-711 BASE Land down
56 * Button 24: button-712 BASE Taxi up
57 * Button 25: button-713 BASE Taxi down
58 * Button 26: button-714 BASE Nav up
59 * Button 27: button-715 BASE Nav down
60 * Button 28: button-716 BASE Strobe up
61 * Button 29: button-717 BASE Strobe down
62 * Button 30: button-718 BASE Magneto Of
63 * Button 31: button-719 BASE Right Mag
64 * Button 32: button-720 BASE Left Mag
65 * Button 33: button-721 BASE Both Mag
66 * Button 34: button-722 BASE Start
67
68 ********************************************************************
69 -->
70
71 <PropertyList>
72 <vendor-id>honeycomb</vendor-id>
73 <model-id>alpha</model-id>
74 <name type="string">Honeycomb Aeronautical Alpha Flight Controls</name>
75 <debug-events type="bool">true</debug-events>
76 <hid-debug-raw type="bool">false</hid-debug-raw>
77 <meta-config>
78 <linux-event>
79 <enabled type="bool">true</enabled>
80 <device-ignore-list>
81 <name-prefix>js</name-prefix>
82 </device-ignore-list>
83 </linux-event>
84 </meta-config>
85 <nasal>
86 <open>
87 <![CDATA[
88 print("Honeycomb Alpha Nasal (event) open");
89 alpha = input_helpers.honeycomb.alpha.new(cmdarg());
90 ]]>
91 </open>
92 <close>
93 <![CDATA[
94 print("Honeycomb Alpha Nasal (event) close");
95 if (ishash(alpha) and isfunc(alpha['close']))
96 alpha.close(cmdarg());
97 ]]>
98 </close>
99 </nasal>
100 <!--config-variants>
101 <variant>
102 <id>default</id>
103 <description>Default config</description>
104 </variant>
105 </config-variants-->
106 <event>
107 <desc>Aileron</desc>
108 <name>abs-y-translate</name>
109 <min-range>0</min-range>
110 <max-range>1023</max-range>
111 <binding>
112 <command>property-scale</command>
113 <property>/controls/flight/aileron</property>
114 </binding>
115 </event>
116 <event>
117 <desc>Elevator</desc>
118 <name>abs-x-translate</name>
119 <min-range>0</min-range>
120 <max-range>1023</max-range>
121 <binding>
122 <command>property-scale</command>
123 <property>/controls/flight/elevator</property>
124 <factor>-1</factor>
125 </binding>
126 </event>
127 <event>
128 <desc>View control</desc>
129 <name>abs-hat</name>
130 <repeatable>true</repeatable>
131 <binding>
132 <command>nasal</command>
133 <script>alpha.adjustView(cmdarg());</script>
134 </binding>
135 </event>
136 <event>
137 <desc>LH yoke trigger button</desc>
138 <name>button-1</name>
139 <repeatable>false</repeatable>
140 <binding>
141 <command>nasal</command>
142 <script>controls.ptt(1)</script>
143 </binding>
144 <mod-up>
145 <binding>
146 <command>nasal</command>
147 <script>controls.ptt(0)</script>
148 </binding>
149 </mod-up>
150 </event>
151 <event>
152 <desc>LH yoke top white button</desc>
153 <name>button-2</name>
154 <repeatable>false</repeatable>
155
156 <binding>
157 <command>property-assign</command>
158 <property>/controls/autoflight/autopilot/engage</property>
159 <value>0</value>
160 </binding>
161 </event>
162 <event>
163 <desc>RH yoke white button</desc>
164 <name>button-3</name>
165 <repeatable>false</repeatable>
166 <binding>
167 <command>nasal</command>
168 <script>
169 view.resetView()
170 </script>
171 </binding>
172 </event>
173 <event>
174 <desc>RH yoke red button</desc>
175 <name>button-4</name>
176 <repeatable>false</repeatable>
177 <binding>
178 <command>property-toggle</command>
179 <property>/controls/gear/brake-parking</property>
180 </binding>
181 </event>
182
183 <event>
184 <desc>Elevator trim up</desc>
185 <name>button-5</name>
186 <repeatable>true</repeatable>
187 <binding>
188 <command>nasal</command>
189 <script>controls.elevatorTrim(-0.5)</script>
190 </binding>
191 </event>
192 <event>
193 <desc>Elevator trim down</desc>
194 <name>button-6</name>
195 <binding>
196 <command>nasal</command>
197 <script>controls.elevatorTrim(0.5)</script>
198 </binding>
199 </event>
200
201 <event>
202 <desc>zoom out</desc>
203 <name>button-7</name>
204 <binding>
205 <command>nasal</command>
206 <script>view.increase()</script>
207 </binding>
208 </event>
209
210 <event>
211 <desc>zoom in</desc>
212 <name>button-8</name>
213 <binding>
214 <command>nasal</command>
215 <script>view.decrease()</script>
216 </binding>
217 </event>
218
219 <event>
220 <desc>Aileron Trim, Left</desc>
221 <name>button-9</name>
222 <repeatable>true</repeatable>
223 <binding>
224 <command>nasal</command>
225 <script>controls.aileronTrim(-1)</script>
226 </binding>
227 </event>
228 <event>
229 <desc>Aileron Trim, Right</desc>
230 <name>button-10</name>
231 <repeatable>true</repeatable>
232 <binding>
233 <command>nasal</command>
234 <script>controls.aileronTrim(1)</script>
235 </binding>
236 </event>
237
238 <event>
239 <desc>Rudder Trim, Left</desc>
240 <name>button-11</name>
241 <repeatable>true</repeatable>
242 <binding>
243 <command>nasal</command>
244 <script>controls.rudderTrim(-1)</script>
245 </binding>
246 </event>
247 <event>
248 <desc>Rudder Trim, Right</desc>
249 <name>button-12</name>
250 <repeatable>true</repeatable>
251 <binding>
252 <command>nasal</command>
253 <script>controls.rudderTrim(1)</script>
254 </binding>
255 </event>
256
257 <event>
258 <desc>Alternator</desc>
259 <name>button-13</name>
260 <binding>
261 <command>nasal</command>
262 <script>setprop("/controls/electric/alternator", 1);</script>
263 </binding>
264 <mod-up>
265 <binding>
266 <command>nasal</command>
267 <script>setprop("/controls/electric/alternator", 0)</script>
268 </binding>
269 </mod-up>
270 </event>
271
272 <event>
273 <desc>Battery Master</desc>
274 <name>button-15</name>
275 <binding>
276 <command>nasal</command>
277 <script>setprop("/controls/electric/battery-switch", 1)</script>
278 </binding>
279 <mod-up>
280 <binding>
281 <command>nasal</command>
282 <script>setprop("/controls/electric/battery-switch", 0)</script>
283 </binding>
284 </mod-up>
285 </event>
286
287 <event>
288 <desc>Avionics</desc>
289 <name>button-17</name>
290 <binding>
291 <command>nasal</command>
292 <script>setprop("/controls/electric/avionics", 1)</script>
293 </binding>
294 <mod-up>
295 <binding>
296 <command>nasal</command>
297 <script>setprop("/controls/electric/avionics", 0)</script>
298 </binding>
299 </mod-up>
300 </event>
301 <event>
302 <desc>Avionics2</desc>
303 <name>button-19</name>
304 <binding>
305 <command>nasal</command>
306 <script>setprop("/controls/electric/avionics2", 1)</script>
307 </binding>
308 <mod-up>
309 <binding>
310 <command>nasal</command>
311 <script>setprop("/controls/electric/avionics2", 0)</script>
312 </binding>
313 </mod-up>
314 </event>
315
316
317 <event>
318 <desc>Beacon, ON OFF</desc>
319 <name>button-21</name>
320 <repeatable>false</repeatable>
321 <binding>
322 <command>nasal</command>
323 <script>setprop("/controls/lighting/beacon", 1)</script>
324 </binding>
325 <mod-up>
326 <binding>
327 <command>nasal</command>
328 <script>setprop("/controls/lighting/beacon", 0)</script>
329 </binding>
330 </mod-up>
331 </event>
332
333 <event>
334 <desc>Landing Lights, ON OFF</desc>
335 <name>button-23</name>
336 <repeatable>false</repeatable>
337 <binding>
338 <command>nasal</command>
339 <script>setprop("/controls/lighting/landing-lights", 1)</script>
340 </binding>
341 <mod-up>
342 <binding>
343 <command>nasal</command>
344 <script>setprop("/controls/lighting/landing-lights", 0)</script>
345 </binding>
346 </mod-up>
347 </event>
348
349 <event>
350 <desc>Taxi Lights, ON OFF</desc>
351 <name>button-25</name>
352 <repeatable>false</repeatable>
353 <binding>
354 <command>nasal</command>
355 <script>setprop("/controls/lighting/taxi-light", 1)</script>
356 </binding>
357 <mod-up>
358 <binding>
359 <command>nasal</command>
360 <script>setprop("/controls/lighting/taxi-light", 0)</script>
361 </binding>
362 </mod-up>
363 </event>
364
365 <event>
366 <desc>Navigation Lights, ON OFF</desc>
367 <name>button-27</name>
368 <repeatable>false</repeatable>
369 <binding>
370 <command>nasal</command>
371 <script>setprop("/controls/lighting/nav-lights", 1)</script>
372 </binding>
373 <mod-up>
374 <binding>
375 <command>nasal</command>
376 <script>setprop("/controls/lighting/nav-lights", 0)</script>
377 </binding>
378 </mod-up>
379 </event>
380
381 <event>
382 <desc>Strobe Light, ON OFF</desc>
383 <name>button-29</name>
384 <repeatable>false</repeatable>
385 <binding>
386 <command>nasal</command>
387 <script>setprop("/controls/lighting/strobe", 1)</script>
388 </binding>
389 <mod-up>
390 <binding>
391 <command>nasal</command>
392 <script>setprop("/controls/lighting/strobe", 0)</script>
393 </binding>
394 </mod-up>
395 </event>
396
397 <event>
398 <desc>Magneto, OFF</desc>
399 <name>button-31</name>
400 <repeatable>false</repeatable>
401 <binding>
402 <command>nasal</command>
403 <script>alpha.setMagnetos(0);</script>
404 </binding>
405 </event>
406 <event>
407 <desc>Magneto, Right</desc>
408 <name>button-32</name>
409 <repeatable>false</repeatable>
410 <binding>
411 <command>nasal</command>
412 <script>alpha.setMagnetos(1);</script>
413 </binding>
414 </event>
415 <event>
416 <desc>Magneto, Left</desc>
417 <name>button-33</name>
418 <repeatable>false</repeatable>
419 <binding>
420 <command>nasal</command>
421 <script>alpha.setMagnetos(2);</script>
422 </binding>
423 </event>
424 <event>
425 <desc>Magneto, Both</desc>
426 <name>button-34</name>
427 <repeatable>false</repeatable>
428 <binding>
429 <command>nasal</command>
430 <script>alpha.setMagnetos(3);</script>
431 </binding>
432 </event>
433 <event>
434 <desc>Starter, ON OFF</desc>
435 <name>button-35</name>
436 <repeatable>false</repeatable>
437 <binding>
438 <command>nasal</command>
439 <script>alpha.setStarter(1)</script>
440 </binding>
441 <mod-up>
442 <binding>
443 <command>nasal</command>
444 <script>alpha.setStarter(0)</script>
445 </binding>
446 </mod-up>
447 </event>
448 </PropertyList>