All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Kosina <jkosina@suse.cz>
To: Johannes Ebke <johannes.ebke@physik.uni-muenchen.de>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: Linux Force Feedback for Saitek Cyborg Evo Force
Date: Fri, 18 Dec 2009 11:52:32 +0100 (CET)	[thread overview]
Message-ID: <alpine.LNX.2.00.0912181150240.3755@pobox.suse.cz> (raw)
In-Reply-To: <4B2ABC62.2030600@physik.uni-muenchen.de>

On Fri, 18 Dec 2009, Johannes Ebke wrote:

> I have looked into the problems some more, and have found that the cause 
> of the crash was a change I made because I misunderstood the code 
> (LO(cmd) is the number of bytes in in the message, and is not 
> transferred on USB - i had removed it from the message...)

Ah, good, thanks.

> First, the changes in the normal input, the joystick axis+buttons message:
> * Prefix is 0x06 instead of 0x01 (joystick) or 0x03 (gamepad)
> * Throttle is not inverted (data[4] instead of 255-data[4])
> * Rudder is present and unsigned (not signed, as in iforce)
> 
> I have attached a patch that I think fixes this (it works for me :) 
> Since saitek uses a different protocol byte, this can be done without 
> adding per-device flags to the driver.
> 
> It also adds a button map btn_saitek_cyborg that switches button 1&2 to
> make the button number the same as printed on the device, and
> abs_saitek_cyborg for a joystick with rudder but only one hat.
> 
> The fftest effects seem to work, but some are feeble and feel strange -
> I suspect there are some subtle changes, for example I am quite sure
> that the Saitek uses signed (twos complement) numbers for effect
> strength (this could perhaps explain the 'strange' behavior for 0x80
> byte values in the current code)...

The changes look really minimal to me, so I'd propose just to add a few 
special cases to the iforce driver itself (probably by setting/checking 
some per-device flag where needed), rather than copy/pasting the whole 
iforce driver.

But the ultimate decision is on Dmitry (CCed) here.

Thanks,

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

  parent reply	other threads:[~2009-12-18 10:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4B26B824.8010403@physik.uni-muenchen.de>
2009-12-15 13:07 ` Linux Force Feedback for Saitek Cyborg Evo Force Jiri Kosina
2009-12-17 23:18   ` Johannes Ebke
2009-12-18  8:59     ` Johannes Ebke
2009-12-18 10:52     ` Jiri Kosina [this message]
2009-12-18 17:50       ` Dmitry Torokhov
2009-12-19 23:36         ` Johannes Ebke
2009-12-21  0:22           ` Melchior FRANZ
2009-12-21  7:44           ` Dmitry Torokhov
2009-12-21  7:59             ` Dmitry Torokhov
2009-12-21  8:22             ` Dmitry Torokhov
2009-12-29 12:46               ` Johannes Ebke
2009-12-29 22:40                 ` Dmitry Torokhov
2009-12-30  3:23                   ` Dmitry Torokhov
2009-12-30  9:01                     ` Johannes Ebke
2009-12-30 10:47                       ` Dmitry Torokhov
2009-12-30 11:32                         ` Johannes Ebke
2011-06-08 18:51                           ` Richie Ward
2009-12-21 11:45             ` [PATCH] " Johannes Ebke
2009-12-21  0:24 Melchior FRANZ

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=alpine.LNX.2.00.0912181150240.3755@pobox.suse.cz \
    --to=jkosina@suse.cz \
    --cc=dmitry.torokhov@gmail.com \
    --cc=johannes.ebke@physik.uni-muenchen.de \
    --cc=linux-input@vger.kernel.org \
    /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 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.