Debian Codegraph @

Input/Joysticks/ThrustMaster/Thrustmaster-TWCS-Throttle.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <!--
4
5 Copyright (c) 2020 Jonathan Schellhase
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 Bindings for Thrustmaster TWCS Throttle
25
26 !Only tested on Ubuntu 18.04 with FlightGear 2910.2.0 (next) from March 7, 2020!
27
28 Assignments:
29
30 Axis 0: View heading (self-centering)
31 Axis 1: View pitch
32 Axis 2: Throttle
33 Axis 5: Rudder
34 Axis 7: Propeller pitch
35 Axis 8: Zoom
36
37 Button 0: Pause
38 Button 1: Left wheel brake
39 Button 2: Right wheel brake
40 Button 3: Elevator trim up
41 Button 4: Elevator trim down
42 Button 6: Aileron trim right
43 Button 8: Aileron trim left
44 Button 10: Rudder trim right
45 Button 12: Rudder trim left
46
47 -->
48
49 <PropertyList>
50 <name type="string">Thrustmaster TWCS Throttle</name>
51 <axis>
52 <desc type="string">View Horizontal Axis</desc>
53 <binding>
54 <command type="string">property-scale</command>
55 <property type="string">/sim/current-view/goal-heading-offset-deg</property>
56 <factor type="double">-180</factor>
57 <offset type="double">0</offset>
58 </binding>
59 </axis>
60 <axis n="1">
61 <desc type="string">View (vertical)</desc>
62 <low>
63 <binding>
64 <command type="string">nasal</command>
65 <script type="string">setprop("/sim/current-view/goal-pitch-offset-deg", getprop("/sim/current-view/goal-pitch-offset-deg") + 1);</script>
66 </binding>
67 <repeatable type="bool">true</repeatable>
68 </low>
69 <high>
70 <binding>
71 <command type="string">nasal</command>
72 <script type="string">setprop("/sim/current-view/goal-pitch-offset-deg", getprop("/sim/current-view/goal-pitch-offset-deg") - 1);</script>
73 </binding>
74 <repeatable type="bool">true</repeatable>
75 </high>
76 </axis>
77 <axis n="2">
78 <desc type="string">Throttle (all)</desc>
79 <binding>
80 <command type="string">nasal</command>
81 <script type="string">controls.throttleAxis();</script>
82 </binding>
83 </axis>
84 <axis n="5">
85 <desc type="string">Rudder</desc>
86 <binding>
87 <command type="string">property-scale</command>
88 <property type="string">/controls/flight/rudder</property>
89 <factor type="double">1</factor>
90 <offset type="double">0</offset>
91 </binding>
92 </axis>
93 <axis n="7">
94 <desc type="string">Propeller All Engines</desc>
95 <binding>
96 <command type="string">property-scale</command>
97 <property type="string">/controls/engines/propeller-pitch-all</property>
98 <factor type="double">-1</factor>
99 <offset type="double">0</offset>
100 </binding>
101 </axis>
102 <axis n="8">
103 <desc type="string">Zoom</desc>
104 <low>
105 <binding>
106 <command type="string">nasal</command>
107 <script type="string">view.increase(0.75);</script>
108 </binding>
109 <repeatable type="double">1</repeatable>
110 </low>
111 <high>
112 <binding>
113 <command type="string">nasal</command>
114 <script type="string">view.decrease(0.75);</script>
115 </binding>
116 <repeatable type="double">1</repeatable>
117 </high>
118 </axis>
119 <button>
120 <desc type="string">Custom</desc>
121 <binding>
122 <command type="string">pause</command>
123 <offset type="double">1</offset>
124 </binding>
125 <mod-up>
126 <binding type="string">
127 </binding>
128 </mod-up>
129 </button>
130 <button n="1">
131 <desc type="string">Custom</desc>
132 <binding>
133 <command type="string">nasal</command>
134 <script type="string">controls.applyBrakes(1, -1)</script>
135 <module type="string">__js1</module>
136 <offset type="double">1</offset>
137 </binding>
138 <mod-up>
139 <binding>
140 <command type="string">nasal</command>
141 <script type="string">controls.applyBrakes(0, -1)</script>
142 <module type="string">__js1</module>
143 <offset type="double">1</offset>
144 </binding>
145 </mod-up>
146 </button>
147 <button n="2">
148 <desc type="string">Custom</desc>
149 <binding>
150 <command type="string">nasal</command>
151 <script type="string">controls.applyBrakes(1, 1)</script>
152 <module type="string">__js1</module>
153 <offset type="double">1</offset>
154 </binding>
155 <mod-up>
156 <binding>
157 <command type="string">nasal</command>
158 <script type="string">controls.applyBrakes(0, 1)</script>
159 <module type="string">__js1</module>
160 <offset type="double">1</offset>
161 </binding>
162 </mod-up>
163 </button>
164 <button n="3">
165 <desc type="string">Elevator trim up</desc>
166 <binding>
167 <command type="string">nasal</command>
168 <script type="string">controls.elevatorTrim(-1);</script>
169 <module type="string">__js1</module>
170 <offset type="double">1</offset>
171 </binding>
172 <repeatable type="double">1</repeatable>
173 <mod-up>
174 <binding type="string">
175 </binding>
176 </mod-up>
177 </button>
178 <button n="4">
179 <desc type="string">Elevator trim down</desc>
180 <binding>
181 <command type="string">nasal</command>
182 <script type="string">controls.elevatorTrim(1);</script>
183 <module type="string">__js1</module>
184 <offset type="double">1</offset>
185 </binding>
186 <repeatable type="double">1</repeatable>
187 <mod-up>
188 <binding type="string">
189 </binding>
190 </mod-up>
191 </button>
192 <button n="6">
193 <desc type="string">Aileron Trim Right</desc>
194 <binding>
195 <command type="string">nasal</command>
196 <script type="string">controls.aileronTrim(1);</script>
197 </binding>
198 <repeatable type="double">1</repeatable>
199 </button>
200 <button n="8">
201 <desc type="string">Aileron Trim Left</desc>
202 <binding>
203 <command type="string">nasal</command>
204 <script type="string">controls.aileronTrim(-1);</script>
205 </binding>
206 <repeatable type="double">1</repeatable>
207 </button>
208 <button n="10">
209 <desc type="string">Rudder Trim Right</desc>
210 <binding>
211 <command type="string">nasal</command>
212 <script type="string">controls.rudderTrim(1);</script>
213 </binding>
214 <repeatable type="double">1</repeatable>
215 </button>
216 <button n="12">
217 <desc type="string">Rudder Trim Left</desc>
218 <binding>
219 <command type="string">nasal</command>
220 <script type="string">controls.rudderTrim(-1);</script>
221 </binding>
222 <repeatable type="double">1</repeatable>
223 </button>
224 </PropertyList>