From a38b133d38053f62c954a09c7442637d36f421c9 Mon Sep 17 00:00:00 2001 From: Serge Bazanski <q3k@q3k.org> Date: Fri, 16 Jun 2023 16:24:10 +0200 Subject: [PATCH] sim: implement scope_draw --- sim/fakes/hardware.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sim/fakes/hardware.py b/sim/fakes/hardware.py index 38438af932..7c86b947af 100644 --- a/sim/fakes/hardware.py +++ b/sim/fakes/hardware.py @@ -409,3 +409,18 @@ def captouch_get_petal_pad(i, x): def freertos_sleep(ms): import _time _time.sleep(ms / 1000.0) + + +def scope_draw(ctx): + import math + + x = -120 + ctx.move_to(x, 0) + for i in range(240): + x2 = x + i + y2 = math.sin(i/10) * 80 + ctx.line_to(x2, y2) + ctx.line_to(130, 0) + ctx.line_to(130, 130) + ctx.line_to(-130, 130) + ctx.line_to(-130, 0) \ No newline at end of file -- GitLab