[PD] joysticks with hid

Christian Klippel ck at mamalala.de
Sat Jan 28 22:59:53 CET 2006


hi david,

Am Samstag 28 Januar 2006 22:29 schrieb David Merrill:
> Hello Hans, et al -
>
> I've got another puzzling joystick bug that's showing up today as i play
> around with the [hid] object in linux (Ubuntu Hoary, kernel 2.6.10-5-686).
>
> I am using a Microsoft "Sidewinder Dual Strike" USB joystick, and after
> changing the permissions on /dev/input/event*
> I can successfully peek at the output with evtest, and I can open the
> device for reading with the [hid] object.
>
> The strange behavior is that when I push the continuous
> input-degree-of-freedom near one edge or another, a *button-press*
> registers, but I have not pressed any button (I see this buttonpress in
> both evtest, and hans' [hid] external). The continuous DOF of this
> joystick has a springy region near the edges where there is some
> resistance - and I get the spurious buttonpress when I cross into this
> region.
>

what exactly happens? it sends continous data, and a certain point it also 
submits a button-press? does the continous data continue beyond this point?
or is it that there is no continous data at all, and only a button function 
around that point?

> I tried the same joystick in windows, and I don't get the spurious
> buttonpresses. (I tested it with both the windows control panel "game
> controllers" interface, and jsarlo's joystick external).
>

if they always happen at a certain point, they are not spurious. how does the 
info for that device look, i.e. what axes and buttons does it have (you can 
query that with the hid object, afaik....)

> Has anyone see this kind of behavior? Any ideas why it doesn't show up
> in Windows, but does in Linux? I'd be really interested to find out how
> to fix something like this..
>
> thanks,
> -David Merrill
>

it may be that the linux event system gets an certain value wrong. at what 
continuos data/value does that occur? for example, if it occurs at the 255 - 
256 crossing, it may be that the 9th bit may be interpreted as a button....

another theory is that the joystick itself send an button event when that 
boundary is reached, but that windows only shows "regular" buttons, while 
linux sends whatever comes .... 

that signal may be used by software to detect when the controller is about to 
reach its limit soon, but i really dont know.

greets,

chris






More information about the Pd-list mailing list