diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-09-02 19:03:22 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-09-02 19:04:12 +0300 |
| commit | 0e47624ebbed48e922fe27170364aebf79217e7b (patch) | |
| tree | 45b80de342211f2eb9fb2164a060f870ca5828e2 | |
| parent | 97433a16dc5aeccb54ce001b54299c3706a56d74 (diff) | |
| download | hid-tmff2-0e47624ebbed48e922fe27170364aebf79217e7b.tar.gz hid-tmff2-0e47624ebbed48e922fe27170364aebf79217e7b.zip | |
always update effect duration
+ According to discussion in #43 this is more along the lines of what
other wheels do.
| -rw-r--r-- | hid-tmt300rs.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/hid-tmt300rs.c b/hid-tmt300rs.c index 5120d4b..31dbfd4 100644 --- a/hid-tmt300rs.c +++ b/hid-tmt300rs.c @@ -536,17 +536,14 @@ static int t300rs_update_duration(struct t300rs_device_entry *t300rs, duration = effect.replay.length - 1; - if (effect.replay.length != old.replay.length) { + t300rs_fill_header(&packet_mod_duration->header, effect.id, 0x49); + packet_mod_duration->marker = cpu_to_le16(0x4100); + packet_mod_duration->duration = cpu_to_le16(duration); - t300rs_fill_header(&packet_mod_duration->header, effect.id, 0x49); - packet_mod_duration->marker = cpu_to_le16(0x4100); - packet_mod_duration->duration = cpu_to_le16(duration); - - ret = t300rs_send_int(t300rs); - if (ret) { - hid_err(t300rs->hdev, "failed modifying duration\n"); - goto error; - } + ret = t300rs_send_int(t300rs); + if (ret) { + hid_err(t300rs->hdev, "failed modifying duration\n"); + goto error; } error: |
