[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tools
Erik wrote:
> > Hmm, nice! Where does it get its meta-information? Also, is there the
> > information about what buttons are part of a hat (and are what
> > directions!)? A nice interface to joysticks IMHO would be an array of
> > "objects" (sounds C++ish, but can be done in a C way, like X events for
> > example), of type "stick", "hat", "button" and "axis" (for lone axis,
> > like a throttle or a brake pedal). A stick would have 6 members, one for
> > each possible axis. Those that don't exist on a given stick stays at
> > neutral position.
> >
>
> I beleive the driver stores it, I think if you unplugged the joystick and
> plugged in a different kind, you'd have to unload and reload the joystick
> module?
Yes. I have 2 sticks on a 'Y' cable and when you do that, you
can only have 2 axes and 2 buttons on each stick - when I want
to use one stick - but use all three axes and 6 buttons, I have
to unload the driver module and reload it with different command
line options.
That's actually nowhere near as bad as it sounds - switching
device drivers in and out on-the-fly seems pretty scarey until
you've done it a few times.
I talked a bit with the author of the present Joystick driver,
suggesting that there should be an ioctl call to switch the
assignment of interface bits to stick buttons/axes. I think
he said that he'd consider it for the next release.
If we had that then someone could easily write a 100 line
FLTK program to provide a point'n'click joystick
setup/calibration widget.
--
Steve Baker (817)619-2657 (Vox/Vox-Mail)
Raytheon Systems Inc. (817)619-2466 (Fax)
Work: sjbaker@hti.com http://www.hti.com
Home: sjbaker1@airmail.net http://web2.airmail.net/sjbaker1