input_device: sync mt slots with kernel
In the class InputDevice, when setting up mt slots, let it also
sync with kernel to get the slots information. Print the slot
information when this module is executed as a script.
BUG=chromium:397397
TEST=Place 2 fingers on the touchpad, and run input_device as
$ /usr/local/autotest/bin/input/input_device.py -t
It would show two slots information representing the two finger
in the header like
.
.
.
$ x: (0,2948), y: (0,1604), z: (0, 255)
slot #0
MT_TOUCH_MAJOR = 280
MT_TOUCH_MINOR = 260
MT_POSITION_X = 927
MT_POSITION_Y = 809
MT_TRACKING_ID = 1450
MT_PRESSURE = 69
slot #1
MT_TOUCH_MAJOR = 280
MT_TOUCH_MINOR = 260
MT_POSITION_X = 1754
MT_POSITION_Y = 460
MT_TRACKING_ID = 1451
MT_PRESSURE = 64
Number of fingers: 2
Current slot id: 1
.
.
.
Change-Id: I6e7e03c2880771d38d12ad1fe038c8f587891fd7
Reviewed-on: https://chromium-review.googlesource.com/209737
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
1 file changed