[PATCH] better accuracy and responsiveness for the freerunner

Dima Kogan dkogan at cds.caltech.edu
Mon Sep 15 23:35:19 CEST 2008

Here's a patch that makes my freerunner's touchscreen produce more
consistent, better data. Andy is working on a different patch to do
this. With my patch, I can type on the matchbox-keyboard with my
fingertips. Currently the issues are that some taps are too soft to be
picked up, and the cursor is slugging when dragging it quickly. Another
issue is the lack of click debouncing. Without this, many soft taps and
soft drags generate spurious, quick "stylus up" events. If a stylus is
lifted for less than x milliseconds, we should ignore that lift event.

The main functional changes in my patch are

1. A lifted stylus always causes big jumps in the data, so when we see
those, we check for a lifted stylus.
2. If we do detect a lifted stylus, we do not use the erratic points in
the averaging
3. reject_threshold_vs_avg_x was previously looking for jumps larger
than 5 pixels and throwing those away. Our hardware is much less
consistent than this. I now look for jumps 70 pixels in the long
direction and 20 pixels in the short direction, and throwing those
4. If I see a click event with less than 2 points in its data, I don't
send it.

I've done all my testing with no user-side filtering (variance
and dejitter disabled in /etc/ts.conf). User-side fitlering may make it
better or worse. Let me know what you think.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: touchscreen_rework.patch
Type: text/x-patch
Size: 13403 bytes
Desc: not available
Url : http://lists.openmoko.org/pipermail/openmoko-kernel/attachments/20080915/7a2807ab/attachment.bin 

More information about the openmoko-kernel mailing list