Weird joystick values

Hello
I’m trying to get SDL joystick to work but i have
some weird problem with values it returns. In
JoyAxisEvent there’s a field:

value Axis value (range: -32768 to 32767)

For some reason, i get values from 27 to 320. I get
the same raw values with jscalibrator but the stick
calibrates fine.
I suppose sdl gets the calibrated values so they should be
in the valid range but for some reason this does not happen.

Any ideas?
The stick is Saitek Cyborg 2000 USB.

PS. Any hints on a good gui library that supports SDL, OpenGL & C++?–
– Ville Ranki
@Ville_Ranki 040-757 2533
http://www.vip.fi/~cosmo/

Do you have the evdev module loaded?

Annoyingly, the new event devices interface on Linux currently cannot
be calibrated. (Linux 2.6 does have the IOCTL to calibrate, only there
is not a program to do it yet.)

SDL has to use the same method that joydev uses by default, returning
your 27 to 320 values.

Either unload the evdev module and calibrate the joydev with jscal.
(Same for any game that uses the joystick interface.) There will
probably be a setting on your distribution that does this at boot.

OR

Compile SDL without input events. (–disable-input-events)On Wed, 2004-03-03 at 21:26, Ville Ranki wrote:

Hello
I’m trying to get SDL joystick to work but i have
some weird problem with values it returns. In
JoyAxisEvent there’s a field:

value Axis value (range: -32768 to 32767)

For some reason, i get values from 27 to 320. I get
the same raw values with jscalibrator but the stick
calibrates fine.
I suppose sdl gets the calibrated values so they should be
in the valid range but for some reason this does not happen.

Any ideas?
The stick is Saitek Cyborg 2000 USB.


Alan.

“One must never be purposelessnessnesslessness.”
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040304/2bd17f84/attachment.pgp