Add support for a "Repeated Tap" test
This add robot support for what used to be called "rapid taps" but
has been changed to more accurately reflect the test.
In this test the operator (robot) taps the same place on the screen
twenty times. The validators then check that there were 20 TIDs and
that there wasn't too much movement in the contacts when you tapped.
This CL also adds a new Validator for this test that checks to make
sure that all of the points are within a 0.5mm circle. This is to
check for repeatable accuracy on the touch device.
BUG=chromium:474709
TEST=manual testing. It works for me with the robot. Manually, it
can't pass the accuracy test, but that's just due to the nature of
the new Validator. It will only produce meaningful results if a
robot does the gesture since human's have too low of a tap accuracy.
Change-Id: I364e66e9292fbcca2a9514f016550856cff8224f
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/275720
Reviewed-by: Dennis Kempin <denniskempin@chromium.org>
diff --git a/gesture_interpreter.py b/gesture_interpreter.py
index 03a44e3..10a1f9e 100644
--- a/gesture_interpreter.py
+++ b/gesture_interpreter.py
@@ -82,6 +82,7 @@
ONE_FINGERTIP_TAP_TESTS = [
tests.ONE_FINGER_TAP,
+ tests.REPEATED_TAPS,
tests.THREE_FINGER_TAP,
tests.FOUR_FINGER_TAP,
tests.FIVE_FINGER_TAP,
@@ -89,6 +90,7 @@
TAP_TEST_FINGERTIPS = {
tests.ONE_FINGER_TAP: STANDARD_FINGERTIP,
+ tests.REPEATED_TAPS: STANDARD_FINGERTIP,
tests.THREE_FINGER_TAP: THREE_FINGER_FINGERTIP,
tests.FOUR_FINGER_TAP: FOUR_FINGER_FINGERTIP,
tests.FIVE_FINGER_TAP: FIVE_FINGER_FINGERTIP,
@@ -143,11 +145,14 @@
elif test.name in ONE_FINGERTIP_TAP_TESTS:
fingertip = robot.fingertips[TAP_TEST_FINGERTIPS[test.name]]
+ num_taps = 20 if test.name == tests.REPEATED_TAPS else 1
vertical_offset = 0
if test.name != tests.ONE_FINGER_TAP:
vertical_offset = robot.LARGE_FINGERTIP_VERTICAL_OFFSET
- fn = lambda: _PerformOneFingertipTapTest(variation, robot, device_spec,
- fingertip, vertical_offset)
+ fn = lambda: _PerformOneFingertipTapTest(
+ variation, robot, device_spec, fingertip,
+ vertical_offset, num_taps)
+
elif test.name == tests.TWO_FINGER_TAP:
fn = lambda: _PerformTwoFingerTapTest(variation, robot, device_spec)
@@ -195,11 +200,11 @@
def _PerformOneFingertipTapTest(variation, robot, device_spec, fingertip,
- vertical_offset):
+ vertical_offset, num_taps):
location, = variation
tap_position = LOCATION_COORDINATES[location]
robot.Tap(device_spec, [fingertip], tap_position,
- vertical_offset=vertical_offset)
+ vertical_offset=vertical_offset, num_taps=num_taps)
def _PerformTwoFingerTapTest(variation, robot, device_spec):