From 746b47a601a24be50c24b242fb2e2429253a8fbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luy=C3=A1=C5=A1=20=C5=98=C3=ADha?= Date: Mon, 18 Apr 2022 20:40:05 +0200 Subject: [PATCH] fix micropython breakout_roundlcd rendering of graphics primitives --- libraries/pico_graphics/pico_graphics.hpp | 2 +- .../modules/breakout_roundlcd/breakout_roundlcd.c | 2 +- .../modules/breakout_roundlcd/breakout_roundlcd.cpp | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libraries/pico_graphics/pico_graphics.hpp b/libraries/pico_graphics/pico_graphics.hpp index 4992e8dc..a80857cf 100644 --- a/libraries/pico_graphics/pico_graphics.hpp +++ b/libraries/pico_graphics/pico_graphics.hpp @@ -87,4 +87,4 @@ namespace pimoroni { void line(Point p1, Point p2); }; -} \ No newline at end of file +} diff --git a/micropython/modules/breakout_roundlcd/breakout_roundlcd.c b/micropython/modules/breakout_roundlcd/breakout_roundlcd.c index 4010fcca..00bc2fb2 100644 --- a/micropython/modules/breakout_roundlcd/breakout_roundlcd.c +++ b/micropython/modules/breakout_roundlcd/breakout_roundlcd.c @@ -75,4 +75,4 @@ const mp_obj_module_t breakout_roundlcd_user_cmodule = { //////////////////////////////////////////////////////////////////////////////////////////////////// MP_REGISTER_MODULE(MP_QSTR_breakout_roundlcd, breakout_roundlcd_user_cmodule, MODULE_BREAKOUT_ROUNDLCD_ENABLED); //////////////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file +//////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/micropython/modules/breakout_roundlcd/breakout_roundlcd.cpp b/micropython/modules/breakout_roundlcd/breakout_roundlcd.cpp index c84ce05c..6a92809f 100644 --- a/micropython/modules/breakout_roundlcd/breakout_roundlcd.cpp +++ b/micropython/modules/breakout_roundlcd/breakout_roundlcd.cpp @@ -474,10 +474,10 @@ mp_obj_t BreakoutRoundLCD_triangle(size_t n_args, const mp_obj_t *pos_args, mp_m int x1 = args[ARG_x1].u_int; int y1 = args[ARG_y1].u_int; - int x2 = args[ARG_x1].u_int; - int y2 = args[ARG_y1].u_int; - int x3 = args[ARG_x1].u_int; - int y3 = args[ARG_y1].u_int; + int x2 = args[ARG_x2].u_int; + int y2 = args[ARG_y2].u_int; + int x3 = args[ARG_x3].u_int; + int y3 = args[ARG_y3].u_int; Point p1(x1, y1); Point p2(x2, y2); @@ -504,8 +504,8 @@ mp_obj_t BreakoutRoundLCD_line(size_t n_args, const mp_obj_t *pos_args, mp_map_t int x1 = args[ARG_x1].u_int; int y1 = args[ARG_y1].u_int; - int x2 = args[ARG_x1].u_int; - int y2 = args[ARG_y1].u_int; + int x2 = args[ARG_x2].u_int; + int y2 = args[ARG_y2].u_int; Point p1(x1, y1); Point p2(x2, y2);