I've just purchased a Logitech Attack 3 usb joystick and it
works great with Flightgear.
It has 11 button and a throttle control.
I have attatched an xml file for inclusion into Flightgear.
The buttons are as follows:
Trigger Button 0 : Brakes
Button 3 : Elevator trim up
Button 2 : Elevator trim down
button 6 : Elevators up
button 7 : Elevators down
button 8 : Brake left
button 9: Brake right
With buttons 11 - Gear up
Button - 10 Gear down
joystick configuration for a Wingman Force 3D USB.
mfranz:
This driver is supposed to work for the non-USB versions, too, so
I'm replacing the non-USB driver with this one, and add its <name>s
here. If it turns out that we need a separate driver, it's better to
derive it from this file, as this is adapted to the newest methods
(nasal wrappers, etc.), while the old driver was only partly functional.
Here is an other one to the data directory. It updates the carrier launchbar
command and catapult launch command to reset itself if the key is no longer
pressed. That fixes the odd behavour, that once a carrier launch happened, a
second lauch happens no longer immediately at arresing time.
The proper file ( the one with axis assignment set correctly for all OSes ) was too quickly removed, certainly because of its -win suffix.
I merged the good things in one file, discarding the problematic ones.
Initial revision. This is the only joystick that the Walmart next to my
house is selling. (What are you going to do?) Buttons 2 and 4 are still
unmapped awaiting any good suggestions.
- 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
avoids the obscure and ugly "which" workaround
Note that the input subsystem sets variable "this" to this joystick's
base property path; This is useful to be able to access the driver's own
information from the property tree. Example:
data = props.globals.getNode(this).getNode("data");
where "this" contains string "/input[0]/joysticks[0]/js[0]" if the js is
the first in the system
for operation-modes; only one user visible change: the speed brake toggle
does now also show a popup like the thrust reverser and the parking brake;
I hope that this is seen as useful help rather than annoyance.
The one hat axis should be 4 for Unix/Linux and 6 for windows (according
to someone on IRC), while the other hat axis is apparently 7 for all
systems. Changed the throttle to Nasal, too.
I didn't nasalify the rest, because that's error-prone and I wouldn't
be able to test it.
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
i modified the joystick settings for the Sidewinder Precision Pro joystick.
Now all buttons and axis react the same way in unix and windows except for
the view elevation binding which is on axis 5 in unix and 7 in windows.
Here the windows axis is inverse, the unix version is not.
This means if you move the hat down in unix you will look down
if you move the hat down in windows you will look up.
To fix this we would need some sort of property to inverse the axis independly
for windows and unix. If you know a way to do this feel free to fix this.
I also added some more button bindings.
With button 1 you can now switch between the views,
The brakes where moved from button 1 to button 0 because this button was
unused and users who want to switch from MS Flight Simulator to FlightGear
will like that too because the buttons are now used the same way on both
sims. With the unused button 8 (shift button), you can now retract the gears.
I also fixed the arrangement for the 4 buttons called A, B, C and D left to
the stick.
With button B you can now turn the flaps up and with button A down.
With button C you can use the left brake and with button D the right brake.
Before those changes the windows and unix bindings were different and somehow
unordered (crossed).
I tested this new Joystick settings in Windows Millenium and
Linux Slackware 10 with Flightgear 0.9.6 for windows and the newest cvs
version from today for Linux.
I use both Linux and Win XP with my CH yoke and pedals and noted that I have two different versions of the yoke xml with the mixture and prop axis reversed. Here is an edit that works for me with both Win XP and Linux.