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 00:26:55 +0200 [thread overview]
Message-ID: <7710689.O2quS97bHe@qosmio-x300> (raw)
In-Reply-To: <e8b1518b49c3c1dd660270df5e512705.squirrel@host171.canaca.com>
On Tuesday 14 of June 2011 17:20:52 you wrote:
> > Hello,
> >
> > this patch fixes two issues with autocentering in lgff driver. Current
> > implementation incorrectly assumes that the saturation force is always
> > 0x80 which is
> > inconsistent with behavior of the official driver. It also makes it
> > impossible to disable autocentering on some wheels - at least Logitech
> > Formula Force RX is
> > the case. Values of stiffness coefficient were also calculated
> > incorrectly. Formula used in this patch appears to generate the same
> > commands as the official
> > Logitech drivers. The patch also fixes two minor coding style issues.
>
> Hi Michal,
> Can you elaborate more on the difference between stiffness and saturation?
> And how these might work in the Linux FF system which only accounts a
> single parameter.
>
> On my reverse engineering of the Wii Wheel (1) I noticed that the
> AutoCentre consisted of 3 variables, but did realise the precise details.
> Perhaps I can factor in a similar adjustment....
>
> BTW - I also discovered some other modes of feedback beyond AutoCentre and
> CF which might be applicable to other Logitech wheels. (2)
>
> Simon
>
> 1.
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=dr
> ivers/hid/hid-lg4ff.c;h=fa550c8e1d1bc639bd3e9c34a299903391bca44a;hb=3a2289a4
> a317e0290a8bc7af28c62c9830cb12e5#l72
>
> 2. http://wiibrew.org/wiki/Logitech_USB_steering_wheel
Sure, but please don't take it like I have some inside knowledge of Logitech FF implementation. I've been given few bits of useful information, the rest I
figured out from sniffed USB communication.
Centering force seems to be modeled as a spring effect. Force created by a spring can be calculated as "F = -k*x" where F = force, k = stiffness coefficient
and x = deflection from centre. The higher the k is, the faster the centering force increases when the wheel is turned. Saturation force seems to be the limit
centering force, so when kx > saturation_force => F = saturation_force.
Logitech driver has a slider which sets the centering force from 0 % to 150 % (it's actually from 0 % to 200 %, at least the values in the command suggest
so) and both the stiffness coeff and saturation force increase gradually with the centering force according to the formula I provide in the patch, so just the
magnitude value is enough. It looks like the stiffness coeff actually wraps around, because 0 = no stiffness, 7 = max stiffness, 8 = low stiffness, 15 = max
stiffness. It'd be interesting to see if you can observe the same behavior on the Wii wheel.
As for the other FF effects, I guess these are things like "rumble" etc. I'm planning to look into it more when I'll have some extra free time.
Regards, Michal.
next prev parent reply other threads:[~2011-06-14 22:26 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ý [this message]
2011-06-14 23:16 ` simon
2011-06-15 0:03 ` Michal Malý
[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=7710689.O2quS97bHe@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 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).