diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-11-04 19:00:37 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-11-04 19:00:37 (GMT) |
| commit | 8e89e381751e79b1bc768886263d02f1b72dfbac (patch) | |
| tree | 53ad3e1231a123cb83b72cea2d18c4b52a3d2c7c /wasp/apps/steps.py | |
| parent | f95f45cda3b4ef2baae1c952521d729fbad00577 (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.py | 6 |
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: |
