[PATCH] cleanup-adc-s3c2410_ts.patch

Nelson Castillo nelsoneci at gmail.com
Thu Nov 27 04:44:42 CET 2008

On Wed, Nov 26, 2008 at 10:12 PM, Nelson Castillo <nelsoneci at gmail.com> wrote:
>   The state TS_STATE_PRESSED_PENDING will be useful to filter short clicks
>   that fail to provide a valid point. We can check this with an
>   additional filter.

I've been tracing the filters and finally I understand how they work
(and how and when each method is called).

You'll notice that we might get erratic clicks (specially the first
one and the last one / specially with light pressure).

In this case the median filter doesn't help much (and you'll notice
that the erratic clicks are usually drawn in the middle of the

This is a real example of what happens in this case. This is the
buffer that the median filter has for one of the coordinates (Let's
say X):

tsfm->sort[...] =  {288  293  302  302  309  311  316  320  324  445
505  516  529  530 539  543  570  588  603  604  722  750  762  764
783  810  827  848 865  893  893}

I guess we should discard this point.

I tried the variance (standard deviation ^ 2 actually) and a threshold
and it worked well in the initial tests.

I'll check more in this direction. Any also has some patches that
check the pressure of the stylus but he didn't manage to normalize the
results across the screen [1]. I think we could get away with some
statistics. There are some tips [2] also to check.

[1] http://lists.openmoko.org/nabble.html#nabble-td1354742
[2] http://lists.openmoko.org/nabble.html#nabble-tt1091362%7Ca1091362

More information about the openmoko-kernel mailing list