From b8459eb685421a472b5c63b8f3a877e56573b50f Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Fri, 21 Feb 2025 09:15:03 +0100 Subject: [PATCH] LVGL Berry fix lvgl_berry_fix_lv_style_prop_arr (#23042) --- .../src/embedded/lvgl_extra.be | 6 +-- .../src/solidify/solidified_lvgl_extra.h | 39 +++++++++---------- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/lib/libesp32_lvgl/lv_binding_berry/src/embedded/lvgl_extra.be b/lib/libesp32_lvgl/lv_binding_berry/src/embedded/lvgl_extra.be index be198b0f9..a93170c02 100644 --- a/lib/libesp32_lvgl/lv_binding_berry/src/embedded/lvgl_extra.be +++ b/lib/libesp32_lvgl/lv_binding_berry/src/embedded/lvgl_extra.be @@ -112,10 +112,10 @@ end class lv_style_prop_arr : bytes def init(l) if type(l) != 'instance' || !isinstance(l, list) raise "value_error", "argument must be a list" end - super(self).init(size(l) * 4) + super(self).init(size(l)) for e: l - self.add(int(e), 4) + self.add(int(e)) end end end @@ -170,4 +170,4 @@ p2.x = 3 p2.y = 4 print(lv_point_arr([p1, p2])) --# \ No newline at end of file +-# diff --git a/lib/libesp32_lvgl/lv_binding_berry/src/solidify/solidified_lvgl_extra.h b/lib/libesp32_lvgl/lv_binding_berry/src/solidify/solidified_lvgl_extra.h index 9255abbd2..ce9f19075 100644 --- a/lib/libesp32_lvgl/lv_binding_berry/src/solidify/solidified_lvgl_extra.h +++ b/lib/libesp32_lvgl/lv_binding_berry/src/solidify/solidified_lvgl_extra.h @@ -436,7 +436,7 @@ be_local_closure(class_lv_style_prop_arr_init, /* name */ }), be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[38]) { /* code */ + ( &(const binstruction[35]) { /* code */ 0x60080004, // 0000 GETGBL R2 G4 0x5C0C0200, // 0001 MOVE R3 R1 0x7C080200, // 0002 CALL R2 1 @@ -455,26 +455,23 @@ be_local_closure(class_lv_style_prop_arr_init, /* name */ 0x6010000C, // 000F GETGBL R4 G12 0x5C140200, // 0010 MOVE R5 R1 0x7C100200, // 0011 CALL R4 1 - 0x54160003, // 0012 LDINT R5 4 - 0x08100805, // 0013 MUL R4 R4 R5 - 0x7C080400, // 0014 CALL R2 2 - 0x60080010, // 0015 GETGBL R2 G16 - 0x5C0C0200, // 0016 MOVE R3 R1 - 0x7C080200, // 0017 CALL R2 1 - 0xA8020008, // 0018 EXBLK 0 #0022 - 0x5C0C0400, // 0019 MOVE R3 R2 - 0x7C0C0000, // 001A CALL R3 0 - 0x8C100104, // 001B GETMET R4 R0 K4 - 0x60180009, // 001C GETGBL R6 G9 - 0x5C1C0600, // 001D MOVE R7 R3 - 0x7C180200, // 001E CALL R6 1 - 0x541E0003, // 001F LDINT R7 4 - 0x7C100600, // 0020 CALL R4 3 - 0x7001FFF6, // 0021 JMP #0019 - 0x58080005, // 0022 LDCONST R2 K5 - 0xAC080200, // 0023 CATCH R2 1 0 - 0xB0080000, // 0024 RAISE 2 R0 R0 - 0x80000000, // 0025 RET 0 + 0x7C080400, // 0012 CALL R2 2 + 0x60080010, // 0013 GETGBL R2 G16 + 0x5C0C0200, // 0014 MOVE R3 R1 + 0x7C080200, // 0015 CALL R2 1 + 0xA8020007, // 0016 EXBLK 0 #001F + 0x5C0C0400, // 0017 MOVE R3 R2 + 0x7C0C0000, // 0018 CALL R3 0 + 0x8C100104, // 0019 GETMET R4 R0 K4 + 0x60180009, // 001A GETGBL R6 G9 + 0x5C1C0600, // 001B MOVE R7 R3 + 0x7C180200, // 001C CALL R6 1 + 0x7C100400, // 001D CALL R4 2 + 0x7001FFF7, // 001E JMP #0017 + 0x58080005, // 001F LDCONST R2 K5 + 0xAC080200, // 0020 CATCH R2 1 0 + 0xB0080000, // 0021 RAISE 2 R0 R0 + 0x80000000, // 0022 RET 0 }) ) );