• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## Tap latency
2
3 * [Video demonstration of tap latency measurement](https://www.youtube.com/watch?v=1xAReF75Cts&list=PLd6Fi7WgXfcCEJg1FDqNCoQfpWo7W3J5a&index=2)
4 * [Detailed instructions on how to perform the measurement in usage doc](usage/WALT_usage.md#tap-latency).
5
6WALT uses a “stylus” equipped with an accelerometer. The finger is imitated by a flat metal
7tip that is grounded, pretty much any rigid tip can be used as long as it triggers the touch sensor.
8When the stylus “collides” with touch screen the accelerometer senses a shock (above 3g) which is
9timestamped by the Teensy. In order to generate a similar shock when picking the stylus up from the
10screen, the conductive surface and the accelerometer are mounted on a button of a retractable pen.
11On the way up, the spring keeps the button in contact with the touch screen for the first few mm of
12motion. This allows the hand holding the main part of the pen to gain some speed to which the button is
13then abruptly accelerated generating an easily detectable shock.
14
15Linux [Multi Touch (MT)](https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt)
16implementation timestamps touch events in the kernel as they arrive from the hardware. On Android
17the MT events are then exposed in Java as
18[MotionEvent](http://developer.android.com/reference/android/view/MotionEvent.html)
19and include the kernel timestamp. For tap, the relevant MotionEvent types are
20ACTION_DOWN and ACTION_UP.
21
22Sample measurements
23
24| Device       | OS version     | ACTION_DOWN [ms]| ACTION_UP [ms]| Kernel to Java [ms] |
25| :---         | :---           |           ---: |           ---: |                 ---: |
26| Nexus 5      | M4B30Z (6.0.1) |           26.9 |           15.9 |                  3.3 |
27| Nexus 5X     | NRD91P (7.0)   |           25.0 |           22.5 |                  2.4 |
28| Nexus 7      | LMY47Q (5.1)   |           29.6 |           31.0 |                  1.4 |
29| Nexus 9      | MMB29K (6.0.1) |           18.7 |           19.9 |                  1.3 |
30
31
32![Tap measurement](usage/images/tap.png)
33![Tap screenshot](Tap_screen_N7.png)
34