Click -> Tap
Rework tap detection so that its clear only single or double taps can be detected at a time. Prior to this change it would detect the individual taps that are part of a double tap.
So, tapped
is now True
if the type of tap specified in set_tap
was detected recently.
This is an API change! To update your code:
- Replace
read_click
withtapped
and change it for a single value. - Rename
set_click
toset_tap
. Most uses ofclick
in names were replaced withtap
to better align with actual use. It remains only in places that match a register of a similar name. - Replace
read_click_raw
withlis3dh._read_register_byte(adafruit_lis3dh.REG_CLICKSRC)
its no longer exposed directly because it requires knowledge of the register bits.
To use in CircuitPython, download the zip file that matches your version of CircuitPython, unzip it, and copy adafruit_lis3dh
to the lib
folder on the CIRCUITPY
drive. Or, simply install the Adafruit CircuitPython bundle.