Commit 120d4281 authored by Peter Hutterer's avatar Peter Hutterer

touchpad: add touch state debugging to the palm and tap state debug logs

Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 75ca6dcf
......@@ -803,8 +803,9 @@ tp_tap_handle_event(struct tp_dispatch *tp,
if (current != tp->tap.state)
evdev_log_debug(tp->device,
"tap: touch %d state %s → %s → %s\n",
"tap: touch %d (%s), tap state %s → %s → %s\n",
t ? (int)t->index : -1,
t ? touch_state_to_str(t->state) : "",
tap_state_to_str(current),
tap_event_to_str(event),
tap_state_to_str(tp->tap.state));
......
......@@ -1201,8 +1201,9 @@ out:
break;
}
evdev_log_debug(tp->device,
"palm: touch %d, palm detected (%s)\n",
"palm: touch %d (%s), palm detected (%s)\n",
t->index,
touch_state_to_str(t->state),
palm_state);
}
......
......@@ -53,6 +53,20 @@ enum touch_state {
TOUCH_END = 5,
};
static inline const char *
touch_state_to_str(enum touch_state state)
{
switch(state) {
CASE_RETURN_STRING(TOUCH_NONE);
CASE_RETURN_STRING(TOUCH_HOVERING);
CASE_RETURN_STRING(TOUCH_BEGIN);
CASE_RETURN_STRING(TOUCH_UPDATE);
CASE_RETURN_STRING(TOUCH_MAYBE_END);
CASE_RETURN_STRING(TOUCH_END);
}
return NULL;
}
enum touch_palm_state {
PALM_NONE = 0,
PALM_EDGE,
......
Markdown is supported
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