Skip to content
Commit c0dc8342 authored by Daniel Drake's avatar Daniel Drake Committed by Dmitry Torokhov
Browse files

Input: hgpk - rework spew detection



The old implementation of spew detection simply tracked the overall
position delta of the cursor over every 100 packets. We found that
this causes occasional false positives in spew detection, and also
that the conditions of the spewy packets are perhaps more fixed than
we once thought.

Rework the spew detection to look for packets of specific small
delta, and only recalibrating if the overall movement delta stays
within expected bounds.

Also discard duplicate packets in the advanced mode, which appear
to be very common. If we don't, the spew detection kicks in far
too early. If we get a large spew of duplicates, request a
recalibration straight up.

Based on earlier work by Paul Fox.

Signed-off-by: default avatarDaniel Drake <dsd@laptop.org>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent ca94ec43
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment