Skip to content

Commit

Permalink
galax: version 210: use ABS_MT_DISTANCE to find pressure 0
Browse files Browse the repository at this point in the history
Appearently there are version 210 of the 0eef:0001 devices that won't send
BTN_TOUCH 0 or ABS_MT_TRACKING_ID -1 on pen-up.

Instead they use ABS_MT_DISTANCE 0 during touching and 1 to indicate
"pressure 0" or pen-up.

This implements just that, for this specific device only. This is not at
all the corrent driver-behaviour according to the protocol after all.
  • Loading branch information
merge committed Mar 19, 2017
1 parent e6ca7cd commit fa10e4c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/galax-raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,13 @@ static int ts_galax_read(struct tslib_module_info *inf,
case ABS_X: i->current_x = ev.value; break;
case ABS_Y: i->current_y = ev.value; break;
case ABS_PRESSURE: i->current_p = ev.value; break;
case ABS_MT_DISTANCE:
if (ev.value > 0)
i->current_p = 0;
else
i->current_p = 255;

break;
}
} else if (i->model_version == VERSION_0100) {
switch (ev.code) {
Expand Down

0 comments on commit fa10e4c

Please sign in to comment.