summaryrefslogtreecommitdiff
path: root/wasp
diff options
context:
space:
mode:
Diffstat (limited to 'wasp')
-rw-r--r--wasp/steplogger.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/wasp/steplogger.py b/wasp/steplogger.py
index 77eb5fd..ca5a968 100644
--- a/wasp/steplogger.py
+++ b/wasp/steplogger.py
@@ -153,6 +153,11 @@ class StepLogger:
now = time.localtime(self._t)
if now[:3] == t[:3]:
latest = self._data
+
+ # Work out where we are in the dump period and update
+ # with the latest counts
+ i = self._t % DUMP_PERIOD // TICK_PERIOD
+ latest[i] = wasp.watch.accel.steps - self._steps
else:
latest = None