linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor@insightbb.com>
To: Renato Golin <rengolin@gmail.com>
Cc: linux-kernel@vger.kernel.org, Jiri Kosina <jkosina@suse.cz>
Subject: Re: joydev.c and saitek cyborg evo force
Date: Mon, 21 May 2007 00:16:20 -0400	[thread overview]
Message-ID: <200705210016.20794.dtor@insightbb.com> (raw)
In-Reply-To: <d9b9d95f0705180654x342ff6dbwf134243dfeabed20@mail.gmail.com>

On Friday 18 May 2007 09:54, Renato Golin wrote:
> 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.
> 

I think we need to make HID driver to report real range for Saitek.
Jiri, any ideas?

-- 
Dmitry

  parent reply	other threads:[~2007-05-21  4:16 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200705210016.20794.dtor@insightbb.com \
    --to=dtor@insightbb.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rengolin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).