On Mon, Sep 01, 2008 at 03:01:43AM +0200, ext andrzej zaborowski wrote: > 2008/8/30 Felipe Balbi <me@xxxxxxxxxxxxxxx>: > > [roughly 470 irrelevant lines discarded] > > + /* discard the event if it still is within the previous rect - unless > > + * if the pressure is harder, but then use previous x,y position */ > > + inside_rect = (ts->sample_sent && > > + x > (int)ts->x - TS_RECT_SIZE && > > + x < (int)ts->x + TS_RECT_SIZE && > > + y > (int)ts->y - TS_RECT_SIZE && > > + y < (int)ts->y + TS_RECT_SIZE); > > + if (inside_rect) > > + x = ts->x, y = ts->y; > > + > > + if (!inside_rect || pressure < ts->p) { > > + tsc2005_ts_update_pen_state(ts, x, y, pressure); > > + ts->sample_sent = 1; > > + ts->x = x; > > + ts->y = y; > > + ts->p = pressure; > > + } > > Minor nit: will this not break ts_calibrate from tslib? ts_calibrate > tries to read 5 samples for every touch, so the user will need to be > moving the pen. I hit this in emulators where noise needs to be added > artifically because userspace (tslib) relies on it. > Also curious why report if pressure becomes harder but not when softer. Works fine for us, but of course that depends on your tslib configuration. We decided to remove the filtering and whathaveyou from tslib and in a novel move, actually receive useful and correct events from evdev, instead of something that needs to be subjected to further arbitrary filtering to be usable. Cheers, Daniel
Attachment:
signature.asc
Description: Digital signature