All of lore.kernel.org
 help / color / mirror / Atom feed
* joydev.c and saitek cyborg evo force
@ 2007-05-18 13:54 Renato Golin
  2007-05-18 21:35 ` Renato Golin
  2007-05-21  4:16 ` Dmitry Torokhov
  0 siblings, 2 replies; 36+ messages in thread
From: Renato Golin @ 2007-05-18 13:54 UTC (permalink / raw)
  To: linux-kernel

Hi,

I'm a kernel newbie so please, pardon my French.

I have a Saitek Cyborg Evo Force, a very good joystick with force-
feedback. Problem is, on Windows it works well (its drivers know its
own idiosyncrasies) but on Linux it gets a bit fuzzy.

The behaviour is that, all axis are working fine, except up/down
(elevator) and left/right (aileron) that gives me "random"
signed/unsigned values.

A smaller problem is that it's reporting 8 axis but have 6 only and 13
buttons but have only 12 and the 12th button is always pressed,
messing fgjs setup utility.

Digging drivers/input/joydev.c I found out that if I remove the
correction (setting
JS_CORR_NONE) the values come correct, in a range from 0 to 4096.

Problem is, on joydev_connect, when defining the corrections for every
axis, the joystick is reporting dev->absmax = 127 and dev->absmin =
-127 for both axis 0 and 1, so the correction is based on a signed
range when the joystick is actually sending an unsigned range.

Also, because the module was expecting up to 127 on value and is getting
4094, when the correction does a left shift it might be setting the
signal bit (leftmost) and that could explain why I'm getting random
signed/unsigned values.

The only way to know what is the real range is when you're actually
pushing and pulling the stick so the change I'm willing to make is to
recalibrate (ie. redefine the correction) whenever the raw value goes
off limits. But that would only extend 127 to 4096 but won't change -127
to 0.

Another alternative is to do a dynamic calibration whenever you move the
stick from the beginning and not do it based on what the joystick is
telling you to (ie. at connect time). But that might be a lot of useless
work when the control gives you the correct range in the first place.

At last, hardcoding "if (saitek)" is quite ugly but can be done for the
sake of performance.

comments, please.

cheers,
--renato

Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2007-08-11 21:15 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-18 13:54 joydev.c and saitek cyborg evo force Renato Golin
2007-05-18 21:35 ` Renato Golin
2007-05-21  4:16 ` Dmitry Torokhov
2007-05-21 12:49   ` Jiri Kosina
2007-05-24 13:27     ` Renato Golin
2007-05-29 23:57     ` Renato Golin
2007-05-30  0:10       ` Jiri Kosina
2007-05-30  9:14         ` Renato Golin
2007-05-30 14:56           ` Jiri Kosina
2007-05-30 15:18             ` Renato Golin
2007-05-30 22:26               ` Renato Golin
2007-05-31 19:53                 ` Dmitry Torokhov
2007-05-31 20:22                   ` Jiri Kosina
2007-05-31 21:48                     ` Jiri Kosina
2007-06-01 18:16                     ` Renato Golin
2007-06-03  9:41                       ` Jiri Kosina
2007-06-04 22:06                         ` Renato Golin
2007-06-04 22:10                           ` Jiri Kosina
2007-06-04 22:46                             ` Renato Golin
2007-06-12 12:28                               ` Renato Golin
2007-06-12 12:37                               ` Jiri Kosina
2007-06-12 13:08                                 ` Renato Golin
2007-06-12 13:13                                   ` Dmitry Torokhov
2007-06-12 13:31                                     ` Renato Golin
2007-06-12 13:45                                       ` Dmitry Torokhov
2007-06-12 15:25                                       ` Jiri Kosina
2007-06-14 22:24                                         ` Renato Golin
2007-06-20 10:00                                           ` Jiri Kosina
2007-07-21  0:10                                             ` Renato Golin
2007-08-10 15:10                                               ` Jiri Kosina
2007-08-10 15:54                                                 ` Jiri Kosina
2007-08-11 17:38                                                   ` Renato Golin
2007-08-11 21:06                                                     ` Jiri Kosina
2007-08-11 21:15                                                       ` Renato Golin
2007-08-10 16:31                                                 ` Renato Golin
2007-08-11 13:42                                                   ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.