diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-03-08 23:16:30 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-03-08 23:16:30 (GMT) |
| commit | 5413d826d7ffe825b759cd013f9f68e9311aee01 (patch) | |
| tree | b4d111931455dffc8a3ea7e4bab219ad856072c3 /wasp/apps/clock.py | |
| parent | 24438ad05daae80c4d27c6e8d0345bfd61d5578b (diff) | |
wasp: Re-factor how Draw565 is used.
Moving it from applications into the watch is useful for two reasons.
Firstly it means applications don't need to know as much about the
display color depth and secondly it makes it easier to replace the
drawing routines with wasptool.
Diffstat (limited to 'wasp/apps/clock.py')
| -rw-r--r-- | wasp/apps/clock.py | 4 |
1 files changed, 1 insertions, 3 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]), |
