summaryrefslogtreecommitdiff
path: root/wasp/apps/steps.py
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-11-04 19:00:37 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-11-04 19:00:37 (GMT)
commit8e89e381751e79b1bc768886263d02f1b72dfbac (patch)
tree53ad3e1231a123cb83b72cea2d18c4b52a3d2c7c /wasp/apps/steps.py
parentf95f45cda3b4ef2baae1c952521d729fbad00577 (diff)
manager: Introduce shared "system bar"
Providing a status bar for all apps to use allows us to reduce allocations within the applications. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp/apps/steps.py')
-rw-r--r--wasp/apps/steps.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/wasp/apps/steps.py b/wasp/apps/steps.py
index d7f16a3..cd888bd 100644
--- a/wasp/apps/steps.py
+++ b/wasp/apps/steps.py
@@ -42,12 +42,12 @@ class StepCounterApp():
def __init__(self):
watch.accel.reset()
- self._bar = wasp.widgets.StatusBar()
self._count = 0
self._prev_day = -1
def foreground(self):
"""Activate the application."""
+ wasp.system.bar.clock = True
self._draw()
wasp.system.request_tick(1000)
@@ -62,13 +62,13 @@ class StepCounterApp():
draw.blit(feet, 12, 132-24)
self._update()
- self._bar.draw()
+ wasp.system.bar.draw()
def _update(self):
draw = wasp.watch.drawable
# Update the status bar
- now = self._bar.update()
+ now = wasp.system.bar.update()
# Reset the step counter if we have move onto the next day
if now and now[2] != self._prev_day: