touchpad: make tp_detect_jumps() time-independent
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 27 Aug 2018 02:35:27 +0000 (12:35 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 30 Aug 2018 22:47:57 +0000 (08:47 +1000)
commit7d0e1875701e750936b8f963db9182ca633df44e
tree5b4dcfac396de926a43e1fb168fdf30ef5e17df6
parent50837e6ff2702fe58d567de2633784d155538dca
touchpad: make tp_detect_jumps() time-independent

This function expected distances per-frame, not per-time which gives us
different behaviors depending on the hardware scanout rate. Fix this by
normalizing to a 12ms frame rate which reflects the touchpad I measured all
the existing thresholds on.

This is a bit of a problem for the test suite which doesn't use proper
intervals and the change to do so is rather invasive. So for now we set the
interval for test devices to whatever the time delta is so we can test the
jumps without having to worry about intervals.

Fixes #121

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-mt-touchpad.c
src/evdev.c
src/evdev.h