Add Stylus support to the touch FW test
This CL adds basic stylus support to the touch FW test by adding an
addition state machine for parsing this new protocol. Styluses use
a simpler protocol since there is only a single stylus supported at
a time, but essentially it works the same way. Currently this state
machine simply ignores any "hover" events, until we have a better
idea of what we want to do with them, but it is capable of parsing
that information out as well. This should allow us to use the same
FW test test out stylus-based devices as well as finger-based ones.
To use this new protocol, simply specify --protocol=stylus when running
the FW test.
Note: since the autodetection of devices wasn't very useful to start
with, and the addition of Stylus made it even more cumbersome and less
valuable that's been removed by this patch for simplicity's sake.
BUG=chromium:622067
TEST=manually tested using a device with a styus screen installed
Change-Id: Iee4c7ade94fcbb82f9b877814df341c2b2c8f7bb
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/354600
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>
diff --git a/main.py b/main.py
index 43d32e3..69a1888 100644
--- a/main.py
+++ b/main.py
@@ -21,7 +21,7 @@
VALID_DUT_TYPES = ['chromeos', 'android', 'elan_i2c', 'elan_ts_i2c',
'synaptics_ts_i2c', 'replay']
VALID_MODES = ['performance', 'noise', 'full']
- VALID_PROTOCOLS = [mt.MTA, mt.MTB, 'auto']
+ VALID_PROTOCOLS = [mt.MTA, mt.MTB, mt.STYLUS, 'auto']
parser = optparse.OptionParser()
# DUT specification information
@@ -41,8 +41,8 @@
parser.add_option('--protocol', dest='protocol', default='auto',
help=('Manually specify the multitouch protocol for the '
'DUT. This should be detected automatically, but '
- 'in the event that fails, you may specify "mtb" or '
- '"mta" with this flag to over-ride it.'))
+ 'in the event that fails, you may specify "mtb", '
+ '"mta", or "stylus" with this flag to over-ride it.'))
parser.add_option('-n', '--name', dest='name', default='unknown_device',
help='The name of this DUT. This is used by the robot to '
'store calibration data and is only needed if you are '