touchpad: add touchpad pressure state debugging to debug output

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2017-03-01 13:42:09 +10:00
parent 2d243cc8a9
commit 3afe8bc914

View file

@ -814,13 +814,18 @@ tp_unhover_pressure(struct tp_dispatch *tp, uint64_t time)
if (t->dirty) {
if (t->state == TOUCH_HOVERING) {
if (t->pressure >= tp->pressure.high) {
evdev_log_debug(tp->device,
"pressure: begin touch\n");
/* avoid jumps when landing a finger */
tp_motion_history_reset(t);
tp_begin_touch(tp, t, time);
}
} else {
if (t->pressure < tp->pressure.low)
if (t->pressure < tp->pressure.low) {
evdev_log_debug(tp->device,
"pressure: end touch\n");
tp_end_touch(tp, t, time);
}
}
}