diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-03-22 12:37:19 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-03-22 12:37:19 (GMT) |
| commit | f8bd1a74613a79cad56b5b60079402d40a87d131 (patch) | |
| tree | a0ac41ef104c8a39375357e2d730d16b9602f86d /wasp/apps/flashlight.py | |
| parent | 5a234c16ada5319228fd2231957ca64d2c9141f8 (diff) | |
Rename manager.py and expose its interfaces to all applications
This is a big change that break compatiblity with existing applications
*and* with existing installed versions of main.py.
When upgrading it is import to update main.py:
./tools/wasptool --upload wasp/main.py
Diffstat (limited to 'wasp/apps/flashlight.py')
| -rw-r--r-- | wasp/apps/flashlight.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/wasp/apps/flashlight.py b/wasp/apps/flashlight.py index f1f9418..13341b0 100644 --- a/wasp/apps/flashlight.py +++ b/wasp/apps/flashlight.py @@ -1,5 +1,4 @@ -import watch -import manager +import wasp class FlashlightApp(object): """Trivial flashlight application. @@ -10,11 +9,11 @@ class FlashlightApp(object): def __init__(self): self.backlight = None - def foreground(self, manager, effect=None): + def foreground(self, effect=None): """Activate the application.""" self.on_screen = ( -1, -1, -1, -1, -1, -1 ) self.draw(effect) - manager.request_tick(1000) + wasp.system.request_tick(1000) def background(self): """De-activate the application (without losing state).""" @@ -28,5 +27,5 @@ class FlashlightApp(object): def draw(self, effect=None): """Redraw the display from scratch.""" - display = watch.display + display = wasp.watch.display display.fill(0xffff) |
