[<prev] [next>] [day] [month] [year] [list]
Message-ID: <96112ebd84b1a60890c01bb6e2dfa181.squirrel@mungewell.org>
Date: Sun, 3 Feb 2013 20:03:54 -0500
From: simon@...gewell.org
To: "Paul Sbarra" <sbarra.paul@...il.com>
Cc: jkosina@...e.cz, simon@...gewell.org, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org, "Paul Sbarra" <sbarra.paul@...il.com>
Subject: Re: [PATCH 3/3] hid: Calibrate Logitech Driving Force axes
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@...il.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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists