All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michal Malý" <madcatxster@gmail.com>
To: simon@mungewell.org
Cc: jkosina@suse.cz, linux-input@vger.kernel.org
Subject: Re: [PATCH] Fix autocentering command in hid-lgff driver
Date: Wed, 15 Jun 2011 02:03:38 +0200	[thread overview]
Message-ID: <3443374.f0SkEvoJ1j@qosmio-x300> (raw)
In-Reply-To: <2756a7d8aa2d4187bb6d39577b69c097.squirrel@host171.canaca.com>

On Tuesday 14 of June 2011 19:16:37 simon@mungewell.org wrote:
> My reverse engineer technique had a python-hid script so that I could
> throw packets directly at the wheel to produce specific force setups. I
> need to port this to python-libusb (as python-hid is dead), but that
> should be relatively simple and can forward off list to anyone who wants a
> copy.
>
You might want to check out Michael Bauer's LTWheelConf [1]. It's written in C so it's not the niftiest thing to use for 
playing around with the wheel, but adding support for the Wii wheel is a matter of 30 seconds. It uses libusb and I'm sure 
it can be easily modified to send whatever data you want to the wheel.

> This would work under Windows and playback various effects in test mode as
> you pushed buttons - if anybody can grab some USB logs of this I can
> attempt to parse them for the codes....
That's kind of my plan. I'll try to write some simple "effect generator" app using DirectInput and sniff the commands. By 
the way, I've been provided with the anti-center spring command description for my Driving Force Pro which I use to set 
the wheel's range. Is it accepted by the Wii wheel as well?

As I read the source of all lgff drivers, I wonder if all Logitech wheels shouldn't be handled in the lg4ff driver. I'm worried 
that further patching of lgff could break functionality with some older joysticks it's been originally meant to work with.

81 0B 19 E6 FF 4A FF:
 8* - set effect number 4, *1 - start effect command
 0B - effect type: spring
 19 - left hand ramp start (MSB)
 E6 - right hand ramp start (MSB)
 F* - RH stiffness (0xF:max), *F - LH stiffness (0xF:max)
 4* - RH ramp start (LSB) , LSbit is RH stiffness sign (0:+ 1:-)
 *A - LH ramp start (LSB), LSbit is LH stiffness sign (0:+ 1:-)
 FF - saturation level for spring force (0xFF = max)

In above example the wheel soft stops are set to
0x19A and 0xE64 or 410 and -412 where 0x7FF or 2047 corresponds to half a rotation range or 450 degrees. Therefore 
the wheel soft stops are set to +-360 degrees - the boundaries are calculated from the outsite.(410 / 2047 * 450)

(Description provided by lbondar, original can be found here [2])

[1] https://github.com/TripleSpeeder/LTWheelConf
[2] http://www.lfsforum.net/showthread.php?p=1603971#post1603971

  reply	other threads:[~2011-06-15  0:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14 20:42 [PATCH] Fix autocentering command in hid-lgff driver Michal Malý
2011-06-14 21:20 ` simon
2011-06-14 22:26   ` Michal Malý
2011-06-14 23:16     ` simon
2011-06-15  0:03       ` Michal Malý [this message]
     [not found]       ` <4429494.nOUqc25rPl@qosmio-x300>
2011-06-15 21:56         ` Michal Malý
     [not found] ` <1908821.jaYXT1Nn2e@qosmio-x300>
     [not found]   ` <da2b7e45ed001b587d49824944b802b8.squirrel@host171.canaca.com>
     [not found]     ` <201106262207.23918.michael@m-bauer.org>
2011-06-27 16:15       ` simon
2011-06-27 20:58         ` Michal Malý
2011-06-29  9:28           ` Michael Bauer
2011-06-29 15:23             ` Michael Bauer
2011-06-29 15:50             ` simon
2011-06-29 21:37               ` Michal Malý
2011-07-05 23:04               ` Michal Malý

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=3443374.f0SkEvoJ1j@qosmio-x300 \
    --to=madcatxster@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=simon@mungewell.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.