Init OK on 2.1.0

LIS3DH doesn't have `set_tap` on 2.1.0.
This commit is contained in:
Scott Shawcroft 2017-12-16 21:54:56 -08:00 committed by GitHub
parent 3b35d80ffd
commit 411190f58a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,7 +119,10 @@ class Express: # pylint: disable=too-many-public-methods
self._lis3dh.range = adafruit_lis3dh.RANGE_8_G
# Initialise tap:
self._lis3dh.set_tap(2, 18, time_limit=4, time_latency=17, time_window=110)
try:
self._lis3dh.set_tap(2, 18, time_limit=4, time_latency=17, time_window=110)
except AttributeError:
pass
self._last_tap = False
@property