summaryrefslogtreecommitdiff
path: root/wasp/apps/clock.py
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-04-05 08:43:26 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-04-06 21:04:20 (GMT)
commit83cc56969e13d1e0e3ea4b2a6b8c9c6875110688 (patch)
treec2b6558cc7f55368d2d4e57efd2357937c3b6c4c /wasp/apps/clock.py
parent6a6e393d1fc389102733fe182ea41b803bd05755 (diff)
wasp: manager: make sleep() and background() callbacks optional
Making callbacks optional reduces pointless boilerplate in applications.
Diffstat (limited to 'wasp/apps/clock.py')
-rw-r--r--wasp/apps/clock.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/wasp/apps/clock.py b/wasp/apps/clock.py
index c9099be..4feba63 100644
--- a/wasp/apps/clock.py
+++ b/wasp/apps/clock.py
@@ -35,19 +35,15 @@ class ClockApp():
self.draw()
wasp.system.request_tick(1000)
- def tick(self, ticks):
- self.update()
-
- def background(self):
- """De-activate the application (without losing state)."""
- pass
-
def sleep(self):
return True
def wake(self):
self.update()
+ def tick(self, ticks):
+ self.update()
+
def draw(self):
"""Redraw the display from scratch."""
draw = wasp.watch.drawable