Debian Codegraph @

Input/HID/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">false</debug-events>
76 <hid-debug-raw type="bool">false</hid-debug-raw>
77 <nasal>
78 <open>
79 <![CDATA[
80 print("Honeycomb Alpha Nasal (event) open");
81 alpha = input_helpers.honeycomb.alpha.new(cmdarg());
82 ]]>
83 </open>
84 <close>
85 <![CDATA[
86 print("Honeycomb Alpha Nasal (event) close");
87 if (ishash(alpha) and isfunc(alpha['close']))
88 alpha.close(cmdarg());
89 ]]>
90 </close>
91 </nasal>
92 <!--config-variants>
93 <variant>
94 <id>default</id>
95 <description>Default config</description>
96 </variant>
97 </config-variants-->
98 <event>
99 <desc>Aileron</desc>
100 <name>abs-y-translate</name>
101 <min-range>0</min-range>
102 <max-range>1023</max-range>
103 <binding>
104 <command>property-scale</command>
105 <property>/controls/flight/aileron</property>
106 </binding>
107 </event>
108 <event>
109 <desc>Elevator</desc>
110 <name>abs-x-translate</name>
111 <min-range>0</min-range>
112 <max-range>1023</max-range>
113 <binding>
114 <command>property-scale</command>
115 <property>/controls/flight/elevator</property>
116 <factor>-1</factor>
117 </binding>
118 </event>
119 <event>
120 <desc>View control</desc>
121 <name>abs-hat</name>
122 <repeatable>true</repeatable>
123 <binding>
124 <command>nasal</command>
125 <script>alpha.adjustView(cmdarg());</script>
126 </binding>
127 </event>
128 <event>
129 <desc>LH yoke trigger button</desc>
130 <name>button-1</name>
131 <repeatable>false</repeatable>
132 <binding>
133 <command>nasal</command>
134 <script>controls.ptt(1)</script>
135 </binding>
136 <mod-up>
137 <binding>
138 <command>nasal</command>
139 <script>controls.ptt(0)</script>
140 </binding>
141 </mod-up>
142 </event>
143 <event>
144 <desc>LH yoke top white button</desc>
145 <name>button-2</name>
146 <repeatable>false</repeatable>
147
148 <binding>
149 <command>property-assign</command>
150 <property>/controls/autoflight/autopilot/engage</property>
151 <value>0</value>
152 </binding>
153 </event>
154 <event>
155 <desc>RH yoke white button</desc>
156 <name>button-3</name>
157 <repeatable>false</repeatable>
158 <binding>
159 <command>nasal</command>
160 <script>
161 view.resetView()
162 </script>
163 </binding>
164 </event>
165 <event>
166 <desc>RH yoke red button</desc>
167 <name>button-4</name>
168 <repeatable>false</repeatable>
169 <binding>
170 <command>property-toggle</command>
171 <property>/controls/gear/brake-parking</property>
172 </binding>
173 </event>
174
175 <event>
176 <desc>Elevator trim up</desc>
177 <name>button-5</name>
178 <repeatable>true</repeatable>
179 <binding>
180 <command>nasal</command>
181 <script>controls.elevatorTrim(-0.5)</script>
182 </binding>
183 </event>
184 <event>
185 <desc>Elevator trim down</desc>
186 <name>button-6</name>
187 <binding>
188 <command>nasal</command>
189 <script>controls.elevatorTrim(0.5)</script>
190 </binding>
191 </event>
192
193 <event>
194 <desc>zoom out</desc>
195 <name>button-7</name>
196 <binding>
197 <command>nasal</command>
198 <script>view.increase()</script>
199 </binding>
200 </event>
201
202 <event>
203 <desc>zoom in</desc>
204 <name>button-8</name>
205 <binding>
206 <command>nasal</command>
207 <script>view.decrease()</script>
208 </binding>
209 </event>
210
211 <event>
212 <desc>Aileron Trim, Left</desc>
213 <name>button-9</name>
214 <repeatable>true</repeatable>
215 <binding>
216 <command>nasal</command>
217 <script>controls.aileronTrim(-1)</script>
218 </binding>
219 </event>
220 <event>
221 <desc>Aileron Trim, Right</desc>
222 <name>button-10</name>
223 <repeatable>true</repeatable>
224 <binding>
225 <command>nasal</command>
226 <script>controls.aileronTrim(1)</script>
227 </binding>
228 </event>
229
230 <event>
231 <desc>Rudder Trim, Left</desc>
232 <name>button-11</name>
233 <repeatable>true</repeatable>
234 <binding>
235 <command>nasal</command>
236 <script>controls.rudderTrim(-1)</script>
237 </binding>
238 </event>
239 <event>
240 <desc>Rudder Trim, Right</desc>
241 <name>button-12</name>
242 <repeatable>true</repeatable>
243 <binding>
244 <command>nasal</command>
245 <script>controls.rudderTrim(1)</script>
246 </binding>
247 </event>
248
249 <event>
250 <desc>Alternator</desc>
251 <name>button-13</name>
252 <binding>
253 <command>nasal</command>
254 <script>setprop("/controls/electric/alternator", 1);</script>
255 </binding>
256 <mod-up>
257 <binding>
258 <command>nasal</command>
259 <script>setprop("/controls/electric/alternator", 0)</script>
260 </binding>
261 </mod-up>
262 </event>
263
264 <event>
265 <desc>Battery Master</desc>
266 <name>button-15</name>
267 <binding>
268 <command>nasal</command>
269 <script>setprop("/controls/electric/battery-switch", 1)</script>
270 </binding>
271 <mod-up>
272 <binding>
273 <command>nasal</command>
274 <script>setprop("/controls/electric/battery-switch", 0)</script>
275 </binding>
276 </mod-up>
277 </event>
278
279 <event>
280 <desc>Avionics</desc>
281 <name>button-17</name>
282 <binding>
283 <command>nasal</command>
284 <script>setprop("/controls/electric/avionics", 1)</script>
285 </binding>
286 <mod-up>
287 <binding>
288 <command>nasal</command>
289 <script>setprop("/controls/electric/avionics", 0)</script>
290 </binding>
291 </mod-up>
292 </event>
293 <event>
294 <desc>Avionics2</desc>
295 <name>button-19</name>
296 <binding>
297 <command>nasal</command>
298 <script>setprop("/controls/electric/avionics2", 1)</script>
299 </binding>
300 <mod-up>
301 <binding>
302 <command>nasal</command>
303 <script>setprop("/controls/electric/avionics2", 0)</script>
304 </binding>
305 </mod-up>
306 </event>
307
308
309 <event>
310 <desc>Beacon, ON OFF</desc>
311 <name>button-21</name>
312 <repeatable>false</repeatable>
313 <binding>
314 <command>nasal</command>
315 <script>setprop("/controls/lighting/beacon", 1)</script>
316 </binding>
317 <mod-up>
318 <binding>
319 <command>nasal</command>
320 <script>setprop("/controls/lighting/beacon", 0)</script>
321 </binding>
322 </mod-up>
323 </event>
324
325 <event>
326 <desc>Landing Lights, ON OFF</desc>
327 <name>button-23</name>
328 <repeatable>false</repeatable>
329 <binding>
330 <command>nasal</command>
331 <script>setprop("/controls/lighting/landing-lights", 1)</script>
332 </binding>
333 <mod-up>
334 <binding>
335 <command>nasal</command>
336 <script>setprop("/controls/lighting/landing-lights", 0)</script>
337 </binding>
338 </mod-up>
339 </event>
340
341 <event>
342 <desc>Taxi Lights, ON OFF</desc>
343 <name>button-25</name>
344 <repeatable>false</repeatable>
345 <binding>
346 <command>nasal</command>
347 <script>setprop("/controls/lighting/taxi-light", 1)</script>
348 </binding>
349 <mod-up>
350 <binding>
351 <command>nasal</command>
352 <script>setprop("/controls/lighting/taxi-light", 0)</script>
353 </binding>
354 </mod-up>
355 </event>
356
357 <event>
358 <desc>Navigation Lights, ON OFF</desc>
359 <name>button-27</name>
360 <repeatable>false</repeatable>
361 <binding>
362 <command>nasal</command>
363 <script>setprop("/controls/lighting/nav-lights", 1)</script>
364 </binding>
365 <mod-up>
366 <binding>
367 <command>nasal</command>
368 <script>setprop("/controls/lighting/nav-lights", 0)</script>
369 </binding>
370 </mod-up>
371 </event>
372
373 <event>
374 <desc>Strobe Light, ON OFF</desc>
375 <name>button-29</name>
376 <repeatable>false</repeatable>
377 <binding>
378 <command>nasal</command>
379 <script>setprop("/controls/lighting/strobe", 1)</script>
380 </binding>
381 <mod-up>
382 <binding>
383 <command>nasal</command>
384 <script>setprop("/controls/lighting/strobe", 0)</script>
385 </binding>
386 </mod-up>
387 </event>
388
389 <event>
390 <desc>Magneto, OFF</desc>
391 <name>button-31</name>
392 <repeatable>false</repeatable>
393 <binding>
394 <command>nasal</command>
395 <script>alpha.setMagnetos(0);</script>
396 </binding>
397 </event>
398 <event>
399 <desc>Magneto, Right</desc>
400 <name>button-32</name>
401 <repeatable>false</repeatable>
402 <binding>
403 <command>nasal</command>
404 <script>alpha.setMagnetos(1);</script>
405 </binding>
406 </event>
407 <event>
408 <desc>Magneto, Left</desc>
409 <name>button-33</name>
410 <repeatable>false</repeatable>
411 <binding>
412 <command>nasal</command>
413 <script>alpha.setMagnetos(2);</script>
414 </binding>
415 </event>
416 <event>
417 <desc>Magneto, Both</desc>
418 <name>button-34</name>
419 <repeatable>false</repeatable>
420 <binding>
421 <command>nasal</command>
422 <script>alpha.setMagnetos(3);</script>
423 </binding>
424 </event>
425 <event>
426 <desc>Starter, ON OFF</desc>
427 <name>button-35</name>
428 <repeatable>false</repeatable>
429 <binding>
430 <command>nasal</command>
431 <script>alpha.setStarter(1)</script>
432 </binding>
433 <mod-up>
434 <binding>
435 <command>nasal</command>
436 <script>alpha.setStarter(0)</script>
437 </binding>
438 </mod-up>
439 </event>
440 </PropertyList>