[PD] joysticks with hid
David Merrill
dmerrill at media.mit.edu
Sat Jan 28 23:37:57 CET 2006
Hi Chris -
Christian Klippel wrote:
>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?
>
yes, that's what happens. there is an invisible threshold at each end of
the continuous range (imagine thresholds at .1 and .9), and I get an
'on' when I cross the threshold in one direction, and an off in the other.
>does the continous data continue beyond this point?
>
>
yes, it's continuous all the way to the end of the mechanical range.
>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....)
>
>
the email I sent a few minutes ago lists the event codes for button
presses, and the threshold-crossing 'buttonpresses'.
>
>
>>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 ....
>
>
yeah, I think this is close to what is happening.
>that signal may be used by software to detect when the controller is about to
>reach its limit soon, but i really dont know.
>
>
yep, that's what the article says.
-David
>greets,
>
>chris
>
>
>
>_______________________________________________
>PD-list at iem.at mailing list
>UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>
>
More information about the Pd-list
mailing list