summaryrefslogtreecommitdiff
path: root/wasp/apps/flashlight.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/flashlight.py
parent6a6e393d1fc389102733fe182ea41b803bd05755 (diff)
wasp: manager: make sleep() and background() callbacks optional
Making callbacks optional reduces pointless boilerplate in applications.
Diffstat (limited to 'wasp/apps/flashlight.py')
-rw-r--r--wasp/apps/flashlight.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/wasp/apps/flashlight.py b/wasp/apps/flashlight.py
index c6c4726..13e3443 100644
--- a/wasp/apps/flashlight.py
+++ b/wasp/apps/flashlight.py
@@ -11,7 +11,6 @@ class FlashlightApp(object):
def foreground(self):
"""Activate the application."""
- self.on_screen = ( -1, -1, -1, -1, -1, -1 )
self.draw()
wasp.system.request_tick(1000)
@@ -22,13 +21,9 @@ class FlashlightApp(object):
"""De-activate the application (without losing state)."""
wasp.system.brightness = self._brightness
- def sleep(self):
- return False
-
def tick(self, ticks):
wasp.system.keep_awake()
def draw(self):
"""Redraw the display from scratch."""
- display = wasp.watch.display
- display.fill(0xffff)
+ wasp.watch.display.fill(0xffff)