From 70fa7742f76acdbda82d357e79d95503e01df296 Mon Sep 17 00:00:00 2001 From: Oleg Date: Mon, 15 Jul 2024 04:36:27 +0300 Subject: [PATCH 1/2] Fix module names in README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 55dbf06..24542e2 100644 --- a/README.md +++ b/README.md @@ -42,16 +42,16 @@ Alternatively, you can install it through DKMS or manually. 5. Reboot To remove module: -`sudo dkms remove universal-ff/ --all` +`sudo dkms remove universal-pidff/ --all` ### Manually 1. Install `linux-headers-$(uname -r)` 2. Clone repository 3. `make` -4. `sudo insmod hid-universal-ff.ko` +4. `sudo insmod hid-universal-pidff.ko` To unload module: -`sudo rmmod hid_universal_ff` +`sudo rmmod hid_universal_pidff` ## How to set up a base parameters? ### MOZA From 11ed3dd91e0139fdd1d87bba8fdddb485af0e7b3 Mon Sep 17 00:00:00 2001 From: Oleg Date: Mon, 15 Jul 2024 04:31:27 +0300 Subject: [PATCH 2/2] Fix NO_DELAY_EFFECT quirk implementation --- hid-pidff.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hid-pidff.c b/hid-pidff.c index 6657731..911a5d5 100644 --- a/hid-pidff.c +++ b/hid-pidff.c @@ -369,7 +369,9 @@ static void pidff_set_effect_report(struct pidff_device *pidff, pidff->effect_direction->value[0] = pidff_rescale(direction, 0xffff, pidff->effect_direction); - pidff->set_effect[PID_START_DELAY].value[0] = effect->replay.delay; + if (!(pidff->quirks & PIDFF_QUIRK_NO_DELAY_EFFECT)) { + pidff->set_effect[PID_START_DELAY].value[0] = effect->replay.delay; + } hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT], HID_REQ_SET_REPORT); @@ -814,7 +816,9 @@ static void pidff_autocenter(struct pidff_device *pidff, u16 magnitude) pidff->set_effect[PID_TRIGGER_REPEAT_INT].value[0] = 0; pidff_set(&pidff->set_effect[PID_GAIN], magnitude); pidff->set_effect[PID_DIRECTION_ENABLE].value[0] = 1; - pidff->set_effect[PID_START_DELAY].value[0] = 0; + if (!(pidff->quirks & PIDFF_QUIRK_NO_DELAY_EFFECT)) { + pidff->set_effect[PID_START_DELAY].value[0] = 0; + } hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT], HID_REQ_SET_REPORT);