This works under Linux only, which is certainly suboptimal. But there's no
reason why support for other OSes couldn't be added later, and there's no
reason to not support Linux now, either. The code can set the throttle's
backlight brightness and the five programmable LEDs. As a demonstration,
the latter is currently used for a gear-down warning. Support for setting
the stick's hardware deadzone is planned. (It's on by default.)
The mechanism writes directly to Linux' hidraw devices, which requires
some simple configuration. This is described in the README. It doesn't
depend on any external utility.
Unfortunately, some aircraft (seahawk) don't play nice and ignore the
common speedbrake property, inventing their own. (These basic concepts
must be *really* hard to understand ...)
These files take complexity out of the main joystick file, while
not adding much code. They also update the description (<desc>)
used by the Help->Joystick information dialog. All <nasal> code
is executed in the joystick's namespace, so variables and funtions
of the main file (popup()) can be accessed.
This allows to have generic axis/button definitions with aircraft
specific or aircraft class specific modification overlays. These
are also found in $FG_HOME, where they override global files. This
mechanism is desirable, because the Warthog is an A-10 replica, and
it should be possible to have an automatically loaded (1:1 mapped)
A-10 joystick config when flying the A-10, while using generic layouts
otherwise, or a specific helicopter overlay for helicopters etc.
Overlay files look exactly like joystick config files, except they
have no <name> and only specify actually differing elements. Axes
with <number> *need* a property index (e.g. <axis n="2">), which
usually corresponds to the <unix> value (i.e. n'th axis def in file).
Overlay files can contain a <nasal> block which is executed on
load. The files are to be named {$FG_ROOT,$FG_HOME}/Input/Joysticks/\
ThrustMaster/Warthog/{Joystick,Throttle}/{generic,helicopter,<aircraft>}\
.xml.
- to support "old-style" gear/flap control (operation as long as button
pressed/lever pushed -> b29/hurricane), let bindings not only report
up/down, but up (-1), stop (0), down (1).
- let controls.flapsDown() ignore "stop" so as to remain compatible with
prior behavior
- adapt all joysticks/aircraft (sigh)
- some minor cosmetics in joystick configs, such as indentation fixes
This file is in a rather bad state. Hence:
- remove doubled "rudder" settings
- fix & nasalify brake properties (/controls/gear/wheel[?]/brake, yet again)
- remove redundant index setting
- nasalify throttle (to allow more than 8 engines)
- nasalify flaps (to make flaps with more than 4 positions work)
- nasalify elevator trim (just for fun :-)
- fix syntax
- remove lots of trailing spaces
File tested by Jon-Eirik Pettersen
The following patch updates the ThrustMaster FCS joystick configuration. I have "Nasal-ized" the joystick bindings, drawing ideas from the Cyborg-Gold-3d-USB configuration file. I also changed some of the bindings, so the joystick setup is more like the default four-axis-joystick config. When I submitted the original config file, I had the hat switch bound to the rudder and elevator trim. Since the vast majority (all?) of the other joystick configs use the hat switch to control view direction, I think it would be best for the defaults for this joystick to conform to the rest in order to obey the "principle of least surprise" for the unsuspecting user.