aboutsummaryrefslogtreecommitdiff
path: root/docs/TapLatency.md
diff options
context:
space:
mode:
authorAndrew Lehmer <alehmer@google.com>2017-04-26 14:58:59 -0700
committerAndrew Lehmer <alehmer@google.com>2017-04-26 14:58:59 -0700
commite76dcf96b0c451e46cddfa695de8feeb92533937 (patch)
treeed9a45d409f988f517e6c3f3a685cbf81ac45a5a /docs/TapLatency.md
parentbcf013dda8ffac9fd76937be6441b44bb9f3586f (diff)
downloadwalt-e76dcf96b0c451e46cddfa695de8feeb92533937.tar.gz
Import google/walt
Cloned from https://github.com/google/walt.git without modification. Bug: 36896528 Test: N/A
Diffstat (limited to 'docs/TapLatency.md')
-rw-r--r--docs/TapLatency.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/TapLatency.md b/docs/TapLatency.md
new file mode 100644
index 0000000..a3f84ae
--- /dev/null
+++ b/docs/TapLatency.md
@@ -0,0 +1,33 @@
+## Tap latency
+
+ * [Video demonstration of tap latency measurement](https://www.youtube.com/watch?v=1xAReF75Cts&list=PLd6Fi7WgXfcCEJg1FDqNCoQfpWo7W3J5a&index=2)
+ * [Detailed instructions on how to perform the measurement in usage doc](usage/WALT_usage.md#tap-latency).
+
+WALT uses a “stylus” equipped with an accelerometer. The finger is imitated by a flat metal
+tip that is grounded, pretty much any rigid tip can be used as long as it triggers the touch sensor.
+When the stylus “collides” with touch screen the accelerometer senses a shock (above 3g) which is
+timestamped by the Teensy. In order to generate a similar shock when picking the stylus up from the
+screen, the conductive surface and the accelerometer are mounted on a button of a retractable pen.
+On the way up, the spring keeps the button in contact with the touch screen for the first few mm of
+motion. This allows the hand holding the main part of the pen to gain some speed to which the button is
+then abruptly accelerated generating an easily detectable shock.
+
+Linux [Multi Touch (MT)](https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt)
+implementation timestamps touch events in the kernel as they arrive from the hardware. On Android
+the MT events are then exposed in Java as
+[MotionEvent](http://developer.android.com/reference/android/view/MotionEvent.html)
+and include the kernel timestamp. For tap, the relevant MotionEvent types are
+ACTION_DOWN and ACTION_UP.
+
+Sample measurements
+
+| Device | OS version | ACTION_DOWN [ms]| ACTION_UP [ms]| Kernel to Java [ms] |
+| :--- | :--- | ---: | ---: | ---: |
+| Nexus 5 | M4B30Z (6.0.1) | 26.9 | 15.9 | 3.3 |
+| Nexus 5X | NRD91P (7.0) | 25.0 | 22.5 | 2.4 |
+| Nexus 7 | LMY47Q (5.1) | 29.6 | 31.0 | 1.4 |
+| Nexus 9 | MMB29K (6.0.1) | 18.7 | 19.9 | 1.3 |
+
+
+![Tap measurement](usage/images/tap.png)
+![Tap screenshot](Tap_screen_N7.png)