touchpad: increase the jump detection interval to 30ms

On serial touchpads it's common enough that frames slow down tofrom the usual
12ms to 24ms. That's too close to our 25ms cutoff so if we have a minor delay,
we end up missing out on jump detection.

Fixes #541

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-11-25 13:26:16 +10:00
parent bfa077d2a8
commit 535f92a546

View file

@ -1534,10 +1534,10 @@ tp_detect_jumps(const struct tp_dispatch *tp,
if (tp->device->model_flags & EVDEV_MODEL_TEST_DEVICE)
reference_interval = tdelta;
/* If the last frame is more than 25ms ago, we have irregular
/* If the last frame is more than 30ms ago, we have irregular
* frames, who knows what's a pointer jump here and what's
* legitimate movement.... */
if (tdelta > 2 * reference_interval || tdelta == 0)
if (tdelta > 2.5 * reference_interval || tdelta == 0)
return false;
/* We historically expected ~12ms frame intervals, so the numbers