-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathxjoymap.ini
275 lines (239 loc) · 7.91 KB
/
xjoymap.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
;
; PI_xJoyMap.py Example main configuration file
;
; xJoyMap doesn't check config parameters so bad parameters will hang
; the plugin and maybe x-plane (sorry for that)
;
; GENERAL SYNTAX:
;
; [Section Name]
; parameter1 = value
; parameter2 = value
;
; The Section Name MUST BE UNIQUE for each assignment
; it will appear as the command description in the
; joystick & equipment -> Buttons: Adv tab
;
; xJoyMap will detect the mode of operation according to the parameters
; defined in each section. In future releases maybe a mode parameter
; will be required
;
; MODE required parameters optional params
; -----------------------------------------------------------------------------------------------
; axis2dataref: axis dataref range type, release, round, steps
; button2dataref incremental new_command dataref increment type
; button2dataref toggle: new_command dataref values type, loop
; buttonAlias: new_command main_command shifted_command, override
; button2dataref switch new_command dataref on_value off_value
; constant *special see example*
;
; ==============================
; Axis to dataref examples
; ==============================
;
; Assigns axis 4 to the map range switch
;
; axis: joy axis
; dataref: Dataref value to interact with:
; You can modify a dataref array specifying the range of the array, or a single index:
; examples: dataref=non/array/dataref ; non array dataref
; dataref=some/array/dataref[1:2] ; array modify values from 1 to 2
; dataref=some/array/dataref[2] ; array dataref modify value 2
;
; note: for non-array datarefs that include [] in their name like sim/weather/wind_speed_kt[1] embedd them in double quotes.
; dataref = "sim/weather/wind_speed_kt[1]"
;
; There are two ways to express range. The original way (maintained for compatibility
; existing configuration files is the range variable described here (The following example
; shows an alternate method:
;
; range: Dataref range, joyOverrides will assign values from 0 to 6 to the dataref
;
[EFIS Map Range]
axis=4
dataref=sim/cockpit/switches/EFIS_map_range_selector
range=6
; The alternate (equivilant method has the same result. It uses drl (data range low) and drh
; (data range high). The drl is the data reference value when the axis is at 0% and
; the drh corresponds to the datareference when the axis is at 100%
[EFIS Map Range]
axis=4
dataref=sim/cockpit/switches/EFIS_map_range_selector
drl=0
drh=6
; The drl/drh also allows reversing the action of the axis ( The same as the "Reverse" check
; box in X-Plane axis settings. Here is the same example with the axis direction reversed
[EFIS Map Range]
axis=4
dataref=sim/cockpit/switches/EFIS_map_range_selector
drl=6
drh=0
;Steps=8 gets you nine notches for your flaps
[Flaps]
axis=4
dataref=sim/cockpit2/controls/flap_ratio
drl=0
drh=1
steps=8
;
; Select vertical velocity with the axis 5
;
; range: for negative ranges joyOverrides will assign values from -range to +range
; ex: -4000 for values from -4000 to 4000
; 4000 for values from 0 to 4000
;
; Note: if you need more ranges tell me a good reason and i will fix-it
;
; type: Dataref type: float or int by default
; Check http://www.xsquawkbox.net/xpsdk/docs/DataRefs.html to know the type of your Dataref
;
; BUG: At the moment xJoyMap will only assign integer values to float values ;-P
; so if you set a 1.45 it will write 1 to the dataref float value.
;
; release: Soft release range to retake control if the value is changed externally
; usually by the autopilot. Otherwise xJoyMap will force the joy value
;
; round: Sometimes datarefs are rounded by the sim. Assign a round value otherwise
; the rounding will be detected as an autopilot intervention.
; ex: 100 for: value+50 < value > value-50
;
; Note: If you specify an array only the first value will be checked
[Vertical Speed]
axis=5
dataref=sim/cockpit/autopilot/vertical_velocity
range=-4000
type=float
release=200
round=100
;[Mixture ratio]
;axis=5
;dataref=sim/cockpit2/engine/actuators/mixture_ratio[1:2](float)
;range=50
;type=float
;release=4
; ==============================
; Button Alias examples
; ==============================
;
; Creates a new "virtual command" at sim/xjoymap/NAV_APP
; that triggers sim/autopilot/NAV
; or sim/autopilot/approach if the shift button is pressed
;
; You must assign your new created command and a shift button
; in the joystick & equipment -> Buttons: Adv tab
; it will appear at the bottom under sim/xjoymap/
[Nav App shifted]
new_command=NAV_APP
main_command=sim/autopilot/NAV
shifted_command=sim/autopilot/approach
;
; Same as above with vertical_peed and altitude_hold
;
[Alt Hold Vertical Speed shifted]
new_command=vpseed_althold
main_command=sim/autopilot/vertical_speed
shifted_command=sim/autopilot/altitude_hold
;
; Example combo command
;
; Creates the command LNAV_VNAV that triggers
; LNAV and VNAV simultaneously
;
; note: You can also define multiple shifted commands
[LNAV VNAV toggle combo]
new_command=LNAV_VNAV
main_command=sim/autopilot/NAV, sim/autopilot/vnav
;
; That's a simple alias to engage the AP Heading
; It just calls the default X-plane Heading Command
;
[Heading engage]
new_command=Heading_Engage
main_command=sim/autopilot/heading
;
; A combo main command with a simple shifted command
;
[LNAV VNAV/Autopilot disengage]
new_command=LNAV_VNAV_sh_AP_diseng
main_command=sim/autopilot/NAV, sim/autopilot/vnav
shifted_command=sim/autopilot/servos_fdir_off
; ============================
; Button to dataref examples
; ============================
;
; toggle mode
;
; For assigments with more than one value, it will define an additional
; *_rev command with reverse direction
; You can disable the automatic looping from the last value to the first one adding
; loop = false
[Map range toggle]
new_command=map_range
dataref=sim/cockpit/switches/EFIS_map_range_selector
values = 0, 1, 2, 3, 4, 5, 6
[Map Mode toggle]
new_command=map_mode
dataref=sim/cockpit/switches/EFIS_map_submode
values = 0, 1, 2, 3, 4
[Afterburner 1 toggle]
new_command=afterburner_1
dataref=sim/cockpit2/engine/actuators/afterburner_enabled[0]
values = 0,1
[Afterburner 2 toggle]
new_command=afterburner_2
dataref=sim/cockpit2/engine/actuators/afterburner_enabled[1]
values = 0,1
[Afterburner both toggle]
new_command=afterburner_both
dataref=sim/cockpit2/engine/actuators/afterburner_enabled[0:1]
values = 0,1
;
; incremental mode
;
; This will define an additional *_rev command with reversed increment
; (increment * -1)
[Increment Heading]
new_command=heading
dataref=sim/cockpit/autopilot/heading_mag
description=Heading
increment=1
type=float
repeat=True
; CONSTATNS
;
; That's an special section should always be named "Constants"
;
; Useful to set some dataref values on X-Plane Startup and on plane change.
;
; Despite the name of the section xJoyMap will set these values only on Startup
; and when a new aircraft is loaded it will not assure that the value remain constant
; during your flight.
;
; You can name the parameters as you like to have a reference of what they do
; but names must be UNIQUE
;
; SYNTAX
; name = dataref, value, type
;
; type is optional defaults to int.
; You can also specify the type embedded within the dataref name
; ex: setme_on_startup=some/fancy/dataref(type)
;[Constants]
;fov=sim/graphics/view/field_of_view_deg, 70, int
;watever=sim/graphics/some_fancy_array[1:2](float), 7
;
; SWITCH Mode
;
; Button to dataref: switch-mode
; Useful for hardware switches
;
[Lights switch]
new_command=Lights
dataref=sim/cockpit/electrical/landing_lights_on
description=Landing lights switch
on_value = 1
off_value = 0
[Lights Landing Right switch]
new_command=Lights_Land_Right
dataref="sim/cockpit2/switches/landing_lights_switch[0](float)"
values = 0, 1