summaryrefslogtreecommitdiff
path: root/src/hwstate.c
Commit message (Collapse)AuthorAgeFilesLines
* janitor: Move min/max and dist functions up to common.hHenrik Rydberg2010-05-141-17/+1
| | | | Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Filter non-zero finger width eventsHenrik Rydberg2010-04-181-3/+13
| | | | | | | Add filtering also to touch/width events, but be careful to treat a zero touch exactly as zero. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Do not reuse tracking ids after a no-touch eventHenrik Rydberg2010-04-181-2/+11
| | | | | | | | | | | | | The fingers going away are important in the matching algorithm, to correctly detect new fingers when placed close to a finger in the process of leaving the surface. However, once a no-touch has been confirmed, the tracking id should not be reused, should a new finger appear close to the removal point. This patch clears the tracking id of all removed or no-touch state fingers, thereby reducing accidental jumps on touch to a minimum. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* janitor: Use more common row/column namesHenrik Rydberg2010-04-151-10/+10
| | | | Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Add robust position event filteringHenrik Rydberg2010-04-151-0/+21
| | | | | | | | | | The kernel filtering is bypassed for MT events. This patch reintroduces filtering at the earliest possible point, right after the fingers have been identified. For drivers that do not set proper fuzz parameters, sensible values are derived based on a generic signal-to-noise ratio. The defuzz code is borrowed from the Linux kernel, thanks GPL. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Do not sort HWState fingersHenrik Rydberg2010-04-151-8/+0
| | | | | | | The fingers are currently sorted in tracking id order, for no good reason. This patch removes the sorting. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Introduce the MTStateHenrik Rydberg2010-04-151-67/+2
| | | | | | | | | | | | | | | The HWState keeps, for good reason, both touching fingers and fingers going away. However, this implies that additional logic is needed to keep track of the number of actual touching fingers. In particular the test for touching fingers is somewhat misplaced in hwstate.c. Moreover, HWState should only exist in one instance, since it contains data which does not need to be referred to during gesture extraction. This patch introduces the MTState structure, which keeps more digested data for gesture extraction. In particular, it only keeps the actual touches. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Rename State to HWStateHenrik Rydberg2010-04-151-0/+162
Rename the hardware state struct State to HWState, to make room for additional state structures. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>