summaryrefslogtreecommitdiff
path: root/wasp/apps
diff options
context:
space:
mode:
Diffstat (limited to 'wasp/apps')
-rw-r--r--wasp/apps/clock.py4
-rw-r--r--wasp/apps/flashlight.py2
-rw-r--r--wasp/apps/testapp.py7
3 files changed, 3 insertions, 10 deletions
diff --git a/wasp/apps/clock.py b/wasp/apps/clock.py
index 5de6271..cde39a2 100644
--- a/wasp/apps/clock.py
+++ b/wasp/apps/clock.py
@@ -3,8 +3,6 @@ import watch
import widgets
import manager
-from draw565 import Draw565
-
DIGITS = (
digits.clock_0,
digits.clock_1,
@@ -86,7 +84,7 @@ class ClockApp(object):
display.rleblit(DIGITS[now[3] // 10], pos=(0*48, 80), fg=0xbdb6)
self.on_screen = now
- draw = Draw565(display)
+ draw = watch.drawable
month = now[1] - 1
month = MONTH[month*3:(month+1)*3]
draw.string('{} {} {}'.format(now[2], month, now[0]),
diff --git a/wasp/apps/flashlight.py b/wasp/apps/flashlight.py
index d71342b..f1f9418 100644
--- a/wasp/apps/flashlight.py
+++ b/wasp/apps/flashlight.py
@@ -1,8 +1,6 @@
import watch
import manager
-from draw565 import Draw565
-
class FlashlightApp(object):
"""Trivial flashlight application.
diff --git a/wasp/apps/testapp.py b/wasp/apps/testapp.py
index 7bbfc2c..56a3853 100644
--- a/wasp/apps/testapp.py
+++ b/wasp/apps/testapp.py
@@ -3,8 +3,6 @@ import widgets
import manager
import machine
-from draw565 import Draw565
-
class TestApp():
"""Simple test application.
"""
@@ -12,7 +10,6 @@ class TestApp():
def __init__(self):
self.tests = ('Touch', 'String')
self.test = self.tests[0]
- self.drawable = Draw565(watch.display)
def foreground(self, system, effect=None):
"""Activate the application."""
@@ -36,7 +33,7 @@ class TestApp():
self.draw()
def touch(self, event):
- draw = self.drawable
+ draw = watch.drawable
if self.test == 'Touch':
draw.string('({}, {})'.format(event[1], event[2]),
0, 108, width=240)
@@ -60,6 +57,6 @@ class TestApp():
"""Redraw the display from scratch."""
watch.display.mute(True)
watch.display.fill(0)
- self.drawable.string('{} test'.format(self.test),
+ watch.drawable.string('{} test'.format(self.test),
0, 6, width=240)
watch.display.mute(False)