summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-12-12 12:24:40 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-12-12 18:19:57 (GMT)
commit338925b4a8e8d7ce54d0ac7e6c9c7b3bd6110737 (patch)
treef6e97a5cc30aecfcf1ea6b1bf9baeb3dd734fbc3
parentc17abd1728ff02e83a348688d288869c42097232 (diff)
apps: testapp: Make the line benchmark use 360 degrees
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
-rw-r--r--wasp/apps/testapp.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/wasp/apps/testapp.py b/wasp/apps/testapp.py
index 81aaaf8..66d3fce 100644
--- a/wasp/apps/testapp.py
+++ b/wasp/apps/testapp.py
@@ -174,15 +174,17 @@ class TestApp():
def _benchmark_line(self):
draw = wasp.watch.drawable
# instead of calculating by trig functions, use LUT
- points = ((120, 170), (139, 166), (155, 155), (166, 139), (170, 120), (166, 101), (155, 85), (139, 74), (120, 70))
+ points = (0, 50), (19, 46), (35, 35), (46, 19),
-
- draw.fill(0, 120, 120, 50, 50)
+ draw.fill(0, 70, 70, 100, 100)
self.scroll.draw()
t = machine.Timer(id=1, period=8000000)
t.start()
for x, y in points:
- draw.line(120, 120, x, y, 0x1f)
+ draw.line(120, 120, 120+x, 120+y, 0xfbc0)
+ draw.line(120, 120, 120+y, 120-x, 0x07c0)
+ draw.line(120, 120, 120-x, 120-y, 0x6b3f)
+ draw.line(120, 120, 120-y, 120+x, 0xffe0)
elapsed = t.time()
t.stop()
del t