diff options
| author | Kai Krakow <kai@kaishome.de> | 2026-08-08 13:04:36 +0200 |
|---|---|---|
| committer | Kai Krakow <kai@kaishome.de> | 2026-08-09 00:20:24 +0200 |
| commit | 4c142e19d14d02d0149198274b0f3f11091c71c6 (patch) | |
| tree | e02f79b1d3b4e5ad0bf6d287a6f7c7661a1eef25 | |
| parent | 1914c478dec801e98e9b73bbfd5bbdc4c0a11cf8 (diff) | |
| download | hid-tmff2-4c142e19d14d02d0149198274b0f3f11091c71c6.tar.gz hid-tmff2-4c142e19d14d02d0149198274b0f3f11091c71c6.zip | |
remove generic input filtering from wheel and pedal axes
+ HID derives fuzz and flat from the logical axis range. On the tested T300
this gives steering fuzz=255 and flat=4095. It filters small corrections
and adds a large centered deadzone before applications apply their own
steering model.
+ Flat is also centered for pedal axes, while their rest position is an
endpoint. Fuzz without an endpoint deadzone can retain a small nonzero
value after the hardware has returned to rest. Both behaviours are
inappropriate for wheel and pedal input, and applications already provide
the required steering and endpoint deadzones.
+ Override fuzz and flat for every available wheel and pedal axis in
input_configured on devices handled by hid-tmff2, following the existing
hid-universal-pidff precedent for high-resolution racing devices. Skip
absent axes through the input device's absbit mask.
| -rw-r--r-- | src/hid-tmff2.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/hid-tmff2.c b/src/hid-tmff2.c index 02e70f1..55e2173 100644 --- a/src/hid-tmff2.c +++ b/src/hid-tmff2.c @@ -807,6 +807,26 @@ static void tmff2_remove(struct hid_device *hdev) kfree(tmff2); } +static int tmff2_input_configured(struct hid_device *hdev, + struct hid_input *hidinput) +{ + struct input_dev *input = hidinput->input; + int axis; + + if (!input->absinfo) + return 0; + + for (axis = ABS_X; axis <= ABS_BRAKE; axis++) { + if (!test_bit(axis, input->absbit)) + continue; + + input_abs_set_fuzz(input, axis, 0); + input_abs_set_flat(input, axis, 0); + } + + return 0; +} + static const struct hid_device_id tmff2_devices[] = { /* t300rs and variations */ {HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, TMT300RS_PS3_NORM_ID)}, @@ -831,6 +851,7 @@ static struct hid_driver tmff2_driver = { .probe = tmff2_probe, .remove = tmff2_remove, .report_fixup = tmff2_report_fixup, + .input_configured = tmff2_input_configured, }; module_hid_driver(tmff2_driver); |
