Browse Source

SleepTk: Adapt for mainline accel_xyz() impl

peter
Peter Cai 2 months ago
parent
commit
e7f53f1d25
  1. 10
      external/SleepTk/SleepTk.py

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…
Cancel
Save