From: David M. <da...@me...> - 2001-07-06 12:41:06
|
Curtis L. Olson writes: > As I understand it, the standard PC joystick interface of old > supported two joysticks, each with two axis, and each with two > buttons. 4 axes and 4 buttons total. > > This apparently has been extended in the modern era, but back a couple > years ago when I bought this, that was the hard limit. It's a gameport device, then? I don't think there's any hard limit on USB devices. My older Logitech Wingman Digital Extreme had a gameport interface, but it could support any number of buttons as well because there was a custom Linux kernel driver for it. I think that what you need, then, is a custom Linux kernel driver for your yoke, one that translates the various combinations into the standard button values (one bit/button) -- the Windows driver probably already has something like that going on in it. If someone hasn't already done so, it probably wouldn't take you more than an hour or two to create a modified version of /usr/src/linux/drivers/char/joystick/analog.c that does the button translations, and then your yoke will work with all Linux apps. You could also try adding configurability directly to analog.c using options on the kernel command line. Just think, Curt -- for so little work, you can get your name into the Linux kernel credits! > Well, maybe I'm confused, but Tony's joystick configurator and your > property manager *appear* to treat each consequetive bit as a separate > button, right? That's how I assume the property system is designed to > work. That's the assumption in general for any Linux joystick driver, as far as I know (and for any PLIB app as well). > It appears that you do a bitwise comparison so combinations of buttons > are not supported. You don't "break" so if someone pressed two > buttons simultaneously, they'd get both event's triggered. Right -- SOP, again. > It seems like it would be an easy "fix" to just use the "buttons" > value returned from read joystick as the button number rather than > trying to bit fiddle. In fact I bet I could have this running in five > minutes if I didn't have to head out to work. If used in combination > with Tony's configurator, you'd get self consistant values, but if you > had the standard 4 buttons, they'd be numbered 1, 2, 4, 8 so that > would be a bit weird. I think FlightGear is the wrong place to change this -- PLIB might be better, but, as I suggested, what you really need is a Linux kernel driver that translates the button info into standard format. All the best, David -- David Megginson da...@me... |