Update the MTB state machine to handle hover

Samus uses ABS_MT_DISTANCE to indicate if fingers are touching
the pad or just hovering over it.  This will likely come up again
in the future too for other hover-enabled touchpads.  Previously
the ABS_MT_DISTANCE event was totally ignored by the MTB state
machine, so for Samus all fingers were treated the same in the
FW test regardless if they were hovering or actually touching
the pad.  This CL add a little logic to the state machine to track
distance as well as x/y/pressure and only include fingers in
the snapshots that are indeed touching the pad.

BUG=none
TEST=ran a noise test on Samus and it worked.  Previously it
would hang indefinitely waiting for all the fingers to dissapear
but they never would, since the robot wasn't lifting them up
far enough.  Now it only counted the fingers actually touching
the pad.

Change-Id: I3ac33e1e2ede6bb57f7676acf0584c5236f8e994
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/325539
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>
3 files changed