summaryrefslogtreecommitdiff
path: root/wasp/apps
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-12-28 12:01:15 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-12-28 12:01:15 (GMT)
commitaef6466550097669740fe0fa9cc9c2c29d37802d (patch)
treee95d98ee728acd79b8e9b19f0abf6733393dc4c5 /wasp/apps
parent8abb6f3f4ddf658c70788c028c6bde156bb018ea (diff)
icons, fonts.digits: Switch over to 2-bit RLE encoding
The 2-bit RLE encoding, in addition to supporting colour is also fully ROMable meaning we can save 32 bytes of RAM per image by switching to 2-bit encoding. Switch everything in icons and font.clock over to 2-bit encoding. Note: this requires all the clock PNG files to be reencoded (because they were originally in 1-bit grayscale format and this is no longer supported by the encoder). This reduces RAM overhead by 480 bytes and has only a negligable effect on FLASH usage (+4 bytes). Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp/apps')
-rw-r--r--wasp/apps/clock.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/wasp/apps/clock.py b/wasp/apps/clock.py
index 2d5e30e..f0af15b 100644
--- a/wasp/apps/clock.py
+++ b/wasp/apps/clock.py
@@ -79,7 +79,7 @@ class ClockApp():
# Clear the display and draw that static parts of the watch face
draw.fill()
- draw.rleblit(digits.clock_colon, pos=(2*48, 80), fg=mid)
+ draw.blit(digits.clock_colon, 2*48, 80, fg=mid)
# Redraw the status bar
wasp.system.bar.draw()
@@ -98,10 +98,10 @@ class ClockApp():
month = MONTH[month*3:(month+1)*3]
# Draw the changeable parts of the watch face
- draw.rleblit(DIGITS[now[4] % 10], pos=(4*48, 80), fg=hi)
- draw.rleblit(DIGITS[now[4] // 10], pos=(3*48, 80), fg=lo)
- draw.rleblit(DIGITS[now[3] % 10], pos=(1*48, 80), fg=hi)
- draw.rleblit(DIGITS[now[3] // 10], pos=(0*48, 80), fg=lo)
+ draw.blit(DIGITS[now[4] % 10], 4*48, 80, fg=hi)
+ draw.blit(DIGITS[now[4] // 10], 3*48, 80, fg=lo)
+ draw.blit(DIGITS[now[3] % 10], 1*48, 80, fg=hi)
+ draw.blit(DIGITS[now[3] // 10], 0*48, 80, fg=lo)
draw.set_color(hi)
draw.string('{} {} {}'.format(now[2], month, now[0]),
0, 180, width=240)