From 78354042b5865d356517f9516228d9f8872cc66a Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 26 Jun 2020 19:24:38 +0300 Subject: more testing --- hid-tmff2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hid-tmff2.c') diff --git a/hid-tmff2.c b/hid-tmff2.c index 869bdb1..34680ff 100644 --- a/hid-tmff2.c +++ b/hid-tmff2.c @@ -22,6 +22,7 @@ #include #include #include +#include #define USB_VENDOR_ID_THRUSTMASTER 0x044f @@ -368,7 +369,8 @@ static int tmff_play(struct input_dev *dev, void *data, x = 256 - (x - 128); } - send_buf[5] = x; + x = (x * fixp_sin16(effect->direction * 360 / 0x10000)) / 0x7fff; + send_buf[5] = x; } -- cgit v1.3