mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: simon@mungewell.org
To: "Paul Sbarra" <sbarra.paul@gmail.com>
Cc: jkosina@suse.cz, simon@mungewell.org,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Paul Sbarra" <sbarra.paul@gmail.com>
Subject: Re: [PATCH 3/3] hid: Calibrate Logitech Driving Force axes
Date: Sun, 3 Feb 2013 20:03:54 -0500	[thread overview]
Message-ID: <96112ebd84b1a60890c01bb6e2dfa181.squirrel@mungewell.org> (raw)
In-Reply-To: <CAGf+dShLdE8hPYdfKw417hYyiox8cqCL3Jm6OQ3P4HfnE63CPw@mail.gmail.com>

Hi Paul,
I think it is unwise to calibrated the 'Driving Force' wheel by adjusting
the report descriptor as it might just be your wheel at fault. Calibration
should be done either with jscal (or eqivilant) or 'in-game'.

In your more recent patch your calibration would be enforced on all wheels
with the USB ID 046d:c294, which is not appropriate.

One thing which might be distorting the values read is the default values
for 'fuzz' and 'flat', which are applied by the kernel.

Probably not the best/only way, but you can use the application
'G25_Manage' to do this...

https://github.com/VDrift/vdrift/tree/master/tools/G25manage

I think that we should work to ensure that these are set to 0 for all
logitech wheels (DFP already has something - although non-ideal). Perhaps
the 'mapped' callback can be used to zero flat/fuzz after the controls
have been mapped, without the need to know what the range is.

Simon.


> This patch should be used in favor of the previous.
>
> Signed-off-by: Paul Sbarra <sbarra.paul@gmail.com>
> ---
>  drivers/hid/hid-lg4ff.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c
> index d7947c7..4b72029e 100644
> --- a/drivers/hid/hid-lg4ff.c
> +++ b/drivers/hid/hid-lg4ff.c
> @@ -43,6 +43,13 @@
>  #define G27_REV_MAJ 0x12
>  #define G27_REV_MIN 0x38
>
> +#define DF_X_MIN 45
> +#define DF_X_MAX 935
> +#define DF_ACCEL_PEDAL_MIN 30
> +#define DF_ACCEL_PEDAL_MAX 175
> +#define DF_BRAKE_PEDAL_MIN 70
> +#define DF_BRAKE_PEDAL_MAX 215
> +
>  #define DFP_X_MIN 0
>  #define DFP_X_MAX 16383
>  #define DFP_PEDAL_MIN 0
> @@ -600,6 +607,12 @@ int lg4ff_init(struct hid_device *hid)
>
>   /* Set default axes parameters */
>   switch (lg4ff_devices[i].product_id) {
> + case USB_DEVICE_ID_LOGITECH_WHEEL:
> + dbg_hid("Setting axes parameters for Driving Force\n");
> + input_set_abs_params(dev, ABS_X, DF_X_MIN, DF_X_MAX, 0, 0);
> + input_set_abs_params(dev, ABS_Y, DF_ACCEL_PEDAL_MIN, DF_ACCEL_PEDAL_MAX,
> 0, 0);
> + input_set_abs_params(dev, ABS_RZ, DF_BRAKE_PEDAL_MIN,
> DF_BRAKE_PEDAL_MAX,
> 0, 0);
> + break;
>   case USB_DEVICE_ID_LOGITECH_DFP_WHEEL:
>   dbg_hid("Setting axes parameters for Driving Force Pro\n");
>   input_set_abs_params(dev, ABS_X, DFP_X_MIN, DFP_X_MAX, 0, 0);
> --
> 1.8.1.1
>



  parent reply	other threads:[~2013-02-04  1:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-02 20:45 [PATCH 1/3] hid: Add report descriptor for Logitech Driving Force wheel Paul Sbarra
2013-02-02 20:45 ` [PATCH 2/3] hid: Split accel, brake " Paul Sbarra
2013-02-02 20:45 ` [PATCH 3/3] hid: Calibrate Logitech Driving Force axes Paul Sbarra
     [not found]   ` <CAGf+dShLdE8hPYdfKw417hYyiox8cqCL3Jm6OQ3P4HfnE63CPw@mail.gmail.com>
2013-02-04  1:03     ` simon [this message]
2013-02-03  0:30 ` [PATCH 1/3] hid: Add report descriptor for Logitech Driving Force wheel simon
2013-02-03  3:27   ` simon

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=96112ebd84b1a60890c01bb6e2dfa181.squirrel@mungewell.org \
    --to=simon@mungewell.org \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sbarra.paul@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

all inboxes | Powered by JetHome®