I've just checked in a new patch for automatic joystick type detection
(where available).  NOTE: it will work *only* if you have a recent (2
months or so) CVS version of plib.

Now, instead of /input/joysticks/js, you can use
/input/joysticks/js-named to create bindings that will be used only
for specific devices; for example, to create bindings for the CH Pro
Yoke USB, you would use this:

  <js-named>
   <name>CH PRODUCTS CH FLIGHT SIM YOKE USB </name>
   ...
  </js-named>

All of the axis and button bindings are as before.  If no named
bindings are found, FlightGear will revert to the regular <js>
bindings as a default, using the device number.

In the base package, I've added customized bindings for the four
controllers I have (CH Pro Yoke, CH Pro Pedals, Logitech Wingman
Rumblepad, and Logitech Extreme Digital 3D joystick): take a look at
the joysticks.xml and the Input/Joysticks/ directory in the base
package to see how it's done.

Although it required only a few lines of C++ code, this is a *big*
improvement to FlightGear -- it will allow new users to plug in their
devices and just have them work, out of the box, once we've collected
enough bindings.

Right now, all of the bindings are read into the main property tree.
I'm planning on moving bindings out into a separate property tree and
on some other changes as well, but this should make a good start.

Please send me your bindings for your own device.  Under Linux, you
can find the device name with a command like

  jstest /dev/js0 | less

(You must include any trailing spaces.)


Enjoy!


David

-- 
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to