SleepTk: Adapt for mainline accel_xyz() impl
This commit is contained in:
parent
978b647cea
commit
e7f53f1d25
10
external/SleepTk/SleepTk.py
vendored
10
external/SleepTk/SleepTk.py
vendored
|
@ -500,13 +500,13 @@ class SleepTkApp():
|
|||
_STORE_FREQ seconds"""
|
||||
if self._currently_tracking:
|
||||
buff = self._buff
|
||||
xyz = wasp.watch.accel.read_xyz()
|
||||
xyz = wasp.watch.accel.accel_xyz()
|
||||
if xyz == (0, 0, 0):
|
||||
wasp.watch.accel.reset()
|
||||
xyz = wasp.watch.accel.read_xyz()
|
||||
buff[0] += xyz[0]
|
||||
buff[1] += xyz[1]
|
||||
buff[2] += xyz[2]
|
||||
xyz = wasp.watch.accel.accel_xyz()
|
||||
buff[0] += xyz[1]
|
||||
buff[1] += xyz[0]
|
||||
buff[2] -= xyz[2]
|
||||
self._data_point_nb += 1
|
||||
|
||||
# add alarm to log accel data in _FREQ seconds
|
||||
|
|
Loading…
Reference in a new issue