apps: fibonacci_clock: Enable status bar for notifications
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This commit is contained in:
parent
89d91f7e5b
commit
a5f69ffe26
1 changed files with 3 additions and 0 deletions
|
@ -54,6 +54,7 @@ class FibonacciClockApp():
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.meter = wasp.widgets.BatteryMeter()
|
self.meter = wasp.widgets.BatteryMeter()
|
||||||
|
self.notifier = wasp.widgets.StatusBar()
|
||||||
self.fields = b'\x05\x03\x02\x01\x01'
|
self.fields = b'\x05\x03\x02\x01\x01'
|
||||||
self.color_codes = [0xffff,0xf800,0x07e0,0x001f] # White, red, green and blue
|
self.color_codes = [0xffff,0xf800,0x07e0,0x001f] # White, red, green and blue
|
||||||
|
|
||||||
|
@ -91,6 +92,7 @@ class FibonacciClockApp():
|
||||||
if now[3] == self.on_screen[3] and now[4] == self.on_screen[4]:
|
if now[3] == self.on_screen[3] and now[4] == self.on_screen[4]:
|
||||||
if now[5] != self.on_screen[5]:
|
if now[5] != self.on_screen[5]:
|
||||||
self.meter.update()
|
self.meter.update()
|
||||||
|
self.notifier.update()
|
||||||
self.on_screen = now
|
self.on_screen = now
|
||||||
return False
|
return False
|
||||||
draw = wasp.watch.drawable
|
draw = wasp.watch.drawable
|
||||||
|
@ -124,4 +126,5 @@ class FibonacciClockApp():
|
||||||
0, 185, width=240)
|
0, 185, width=240)
|
||||||
|
|
||||||
self.meter.update()
|
self.meter.update()
|
||||||
|
self.notifier.update()
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Reference in a new issue