Work on issue #2144454: Inconsistent swipes...
This introduces some hacks in the framework to try to clean up the data we are getting from the touch screen. There are two main things being done here: 1. Look for changes in position that are unreasonably large, and ignore them. This is intended to eliminate the spurious jumps that often happen when releasing. 2. Add some simple adaptive averaging of the touch data. If the difference between the last and next point is large enough, we disable the averaging; otherwise we average up to the last 5 points. The goal is to get rid of the noise of small movements so that things like taps don't look like short flings, while still responding quickly to rapid movement. For averaging pressure, we also weight each averaged coordinate by the reported pressure at that point. This is intended to keep the coordinates closer together during a release, when the pressure is going down and the accuracy decreasing. It may also result in some other interesting artifacts, but hopefully nothing problematic. Change-Id: I1369e9ab015c406946a45c2d72547da9c604178f
Loading
Please register or sign in to comment