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/fibonacci_clock.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/fibonacci_clock.py')
| -rw-r--r-- | wasp/apps/fibonacci_clock.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/wasp/apps/fibonacci_clock.py b/wasp/apps/fibonacci_clock.py index 3f0ca95..3718cfc 100644 --- a/wasp/apps/fibonacci_clock.py +++ b/wasp/apps/fibonacci_clock.py @@ -61,12 +61,9 @@ class FibonacciClockApp(): NAME = 'Fibo' ICON = icon - def __init__(self): - self._bar = wasp.widgets.StatusBar() - def foreground(self): """Activate the application.""" - self._bar.clock = False + wasp.system.bar.clock = False self._draw(True) wasp.system.request_tick(1000) @@ -86,9 +83,9 @@ class FibonacciClockApp(): if redraw: now = wasp.watch.rtc.get_localtime() draw.fill() - self._bar.draw() + wasp.system.bar.draw() else: - now = self._bar.update() + now = wasp.system.bar.update() if not now or self._min == now[4]: return |
