does this on the raw values, so a data stream like: 0 100 250 300 299 300 250 100 0 actually registers as 2 fingers.This patch updates the logic to ignore small dips in pressure that are less
than the threshold. Signed-off-by: Jeremy Huddleston <jeremyhu@xxxxxxxxxxxxxxx>diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/ appletouch.c
index 454b961..9bb42f6 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c@@ -349,7 +349,7 @@ static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact,
(!is_increasing && xy_sensors[i - 1] < xy_sensors[i])) { (*fingers)++; is_increasing = 1; - } else if (i > 0 && xy_sensors[i - 1] >= xy_sensors[i]) {+ } else if (i > 0 && (xy_sensors[i - 1] - xy_sensors[i] > threshold)) {
is_increasing = 0; }
Attachment:
appletouch.patch
Description: Binary data