From 0cc79876890713b49ff6ed155828707f494e37c2 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Sat, 28 Mar 2020 17:19:34 +0000 Subject: [PATCH] apps: Remove unused support for effect animation After a bit of testing I have not yet come up with a fast, visually acceptable horizontal animated effect. Instead we simply reply on screen blanking during the redraw... meaning there is no need for an effect hint. --- wasp/apps/clock.py | 6 +++--- wasp/apps/flashlight.py | 6 +++--- wasp/apps/testapp.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wasp/apps/clock.py b/wasp/apps/clock.py index 9225cc9..c9099be 100644 --- a/wasp/apps/clock.py +++ b/wasp/apps/clock.py @@ -29,10 +29,10 @@ class ClockApp(): def __init__(self): self.meter = wasp.widgets.BatteryMeter() - def foreground(self, effect=None): + def foreground(self): """Activate the application.""" self.on_screen = ( -1, -1, -1, -1, -1, -1 ) - self.draw(effect) + self.draw() wasp.system.request_tick(1000) def tick(self, ticks): @@ -48,7 +48,7 @@ class ClockApp(): def wake(self): self.update() - def draw(self, effect=None): + def draw(self): """Redraw the display from scratch.""" draw = wasp.watch.drawable diff --git a/wasp/apps/flashlight.py b/wasp/apps/flashlight.py index 161aade..c6c4726 100644 --- a/wasp/apps/flashlight.py +++ b/wasp/apps/flashlight.py @@ -9,10 +9,10 @@ class FlashlightApp(object): Shows a pure white screen with the backlight set to maximum. """ - def foreground(self, effect=None): + def foreground(self): """Activate the application.""" self.on_screen = ( -1, -1, -1, -1, -1, -1 ) - self.draw(effect) + self.draw() wasp.system.request_tick(1000) self._brightness = wasp.system.brightness @@ -28,7 +28,7 @@ class FlashlightApp(object): def tick(self, ticks): wasp.system.keep_awake() - def draw(self, effect=None): + def draw(self): """Redraw the display from scratch.""" display = wasp.watch.display display.fill(0xffff) diff --git a/wasp/apps/testapp.py b/wasp/apps/testapp.py index 857ba4b..711feda 100644 --- a/wasp/apps/testapp.py +++ b/wasp/apps/testapp.py @@ -12,10 +12,10 @@ class TestApp(): self.tests = ('Touch', 'String') self.test = self.tests[0] - def foreground(self, effect=None): + def foreground(self): """Activate the application.""" self.on_screen = ( -1, -1, -1, -1, -1, -1 ) - self.draw(effect) + self.draw() wasp.system.request_event(wasp.EventMask.TOUCH | wasp.EventMask.SWIPE_UPDOWN) @@ -55,7 +55,7 @@ class TestApp(): return True - def draw(self, effect=None): + def draw(self): """Redraw the display from scratch.""" wasp.watch.display.mute(True) wasp.watch.drawable.fill()