linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: ???????????? ?????????????? <sergey.belyashov@gmail.com>
Cc: linux-input@vger.kernel.org, Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH] Autocentering support for Logitech MOMO Racing Wheel (force feedback)
Date: Mon, 18 Aug 2008 11:24:18 -0400	[thread overview]
Message-ID: <20080818110815.ZZRA012@mailhub.coreip.homeip.net> (raw)
In-Reply-To: <bb829a0b0808180217t2bd3ed49q4cf5734dcc756311@mail.gmail.com>

Hi Sergey,

On Mon, Aug 18, 2008 at 01:17:48PM +0400, ???????????? ?????????????? wrote:
> Hello.
>   Current kernel has no support for autocentering for Logitech wheels.
> By default autocentering enabled in wheel and constant effect does not
> work properly. Using USB sniffer I found command which change
> autocentering settings: 0xFE, 0x0D, 0x0R, 0x0L, 0x80, 0x00, 0x00,
> where R - clockwise force, L - counter-clockwise (0x0-0xF, 0xC =
> 100%). I write patch for my current kernel (2.6.25), but I think git
> version also supported, because I do not found any changes in it.
> Currently kernel interface has no support for separate autocenter
> control and so I do not implement it.
>   And some interesting command 0xF3 (or 0xF5 - I do not understand
> difference) which makes wheel very easy to rotate (a-la wheel booster
> - no any resistance). Effect of that command can be disabled by
> setting any (zero too) autocentering strength. I do not found in
> kernel interface any standart command for this feature.

This could probably implemented via a sysfs device knob...

> 
>  	error = input_ff_create_memless(dev, NULL, hid_lgff_play);
>  	if (error)
>  		return error;
> 
> +	if (autocenter && dev->ff && (!dev->ff->set_autocenter))
> +		dev->ff->set_autocenter = hid_lgff_set_autocenter;
> +

You can just do "if (test_bit(FF_AUTOCENTER, dev->ffbit))" and you
won't need a temp variable. Also why do you need the rest of the check?

-- 
Dmitry

  reply	other threads:[~2008-08-18 15:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-18  9:17 [PATCH] Autocentering support for Logitech MOMO Racing Wheel (force feedback) Сергей Беляшов
2008-08-18 15:24 ` Dmitry Torokhov [this message]
     [not found]   ` <bb829a0b0808180916l1d2ca72fj689edcf5b8c156e5@mail.gmail.com>
     [not found]     ` <20080818131807.ZZRA012@mailhub.coreip.homeip.net>
2008-08-18 18:30       ` Сергей Беляшов
2008-08-19  0:34         ` D. Ragno
2008-08-19  7:51           ` Сергей Беляшов
2008-08-19 12:59         ` Jiri Kosina
2008-08-19 17:46           ` Сергей Беляшов
2008-09-02 15:11             ` 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=20080818110815.ZZRA012@mailhub.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=sergey.belyashov@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).