diff options
| author | Kimplul <please_don't@IHaveNoWorkEmail.com> | 2020-06-26 19:24:38 +0300 |
|---|---|---|
| committer | Kimplul <please_don't@IHaveNoWorkEmail.com> | 2020-06-26 19:24:38 +0300 |
| commit | 78354042b5865d356517f9516228d9f8872cc66a (patch) | |
| tree | c60b02a4fc37236a109f4e0c9c82aec606171f2e /hid-tmff2.c | |
| parent | 2985abb05c4d9ba289693671cdd47b7d8df89e7a (diff) | |
| download | hid-tmff2-78354042b5865d356517f9516228d9f8872cc66a.tar.gz hid-tmff2-78354042b5865d356517f9516228d9f8872cc66a.zip | |
more testing
Diffstat (limited to 'hid-tmff2.c')
| -rw-r--r-- | hid-tmff2.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 <linux/input.h> #include <linux/slab.h> #include <linux/module.h> +#include <linux/fixp-arith.h> #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; } |
