Skip to content

Commit b29ef3d

Browse files
authored
Fix 'haspmota.parse()' page parsing (#23403)
* Fix 'haspmota.parse()' page parsing * take into account current page as default
1 parent 8ea1503 commit b29ef3d

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
1212
- ESP32 Platform from 2025.04.30 to 2025.05.40, Framework (Arduino Core) from v3.1.3.250411 to v3.2.0.250504 and IDF from v5.3.2.250403 to v5.4.1.250501 (#23397)
1313

1414
### Fixed
15+
- Fix `haspmota.parse()` page parsing
1516

1617
### Removed
1718

lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_haspmota.be

+2-1
Original file line numberDiff line numberDiff line change
@@ -3140,9 +3140,10 @@ class HASPmota
31403140
var jline = json.load(j)
31413141

31423142
if type(jline) == 'instance'
3143+
self.lvh_page_cur_idx_parsing = self.lvh_page_cur_idx
31433144
self.parse_page(jline) # parse page first to create any page related objects, may change self.lvh_page_cur_idx_parsing
31443145
# objects are created in the current page
3145-
self.parse_obj(jline, self.lvh_pages[self.lvh_page_cur_idx]) # then parse object within this page
3146+
self.parse_obj(jline, self.lvh_pages[self.lvh_page_cur_idx_parsing]) # then parse object within this page
31463147
else
31473148
raise "value_error", "unable to parse JSON line"
31483149
end

lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_haspmota.h

+17-15
Original file line numberDiff line numberDiff line change
@@ -12457,7 +12457,7 @@ be_local_class(lvh_page,
1245712457
be_str_weak(lvh_page)
1245812458
);
1245912459
extern const bclass be_class_HASPmota;
12460-
// compact class 'HASPmota' ktab size: 129, total: 208 (saved 632 bytes)
12460+
// compact class 'HASPmota' ktab size: 129, total: 209 (saved 640 bytes)
1246112461
static const bvalue be_ktab_class_HASPmota[129] = {
1246212462
/* K0 */ be_nested_str_weak(has),
1246312463
/* K1 */ be_nested_str_weak(page),
@@ -13905,7 +13905,7 @@ be_local_closure(class_HASPmota_parse, /* name */
1390513905
&be_ktab_class_HASPmota, /* shared constants */
1390613906
be_str_weak(parse),
1390713907
&be_const_str_solidified,
13908-
( &(const binstruction[21]) { /* code */
13908+
( &(const binstruction[23]) { /* code */
1390913909
0xA40ACC00, // 0000 IMPORT R2 K102
1391013910
0x8C0C056B, // 0001 GETMET R3 R2 K107
1391113911
0x5C140200, // 0002 MOVE R5 R1
@@ -13914,19 +13914,21 @@ be_local_closure(class_HASPmota_parse, /* name */
1391413914
0x5C140600, // 0005 MOVE R5 R3
1391513915
0x7C100200, // 0006 CALL R4 1
1391613916
0x1C100941, // 0007 EQ R4 R4 K65
13917-
0x78120009, // 0008 JMPF R4 #0013
13918-
0x8C100170, // 0009 GETMET R4 R0 K112
13919-
0x5C180600, // 000A MOVE R6 R3
13920-
0x7C100400, // 000B CALL R4 2
13921-
0x8C100173, // 000C GETMET R4 R0 K115
13922-
0x5C180600, // 000D MOVE R6 R3
13923-
0x881C0105, // 000E GETMBR R7 R0 K5
13924-
0x88200104, // 000F GETMBR R8 R0 K4
13925-
0x941C0E08, // 0010 GETIDX R7 R7 R8
13926-
0x7C100600, // 0011 CALL R4 3
13927-
0x70020000, // 0012 JMP #0014
13928-
0xB006E37D, // 0013 RAISE 1 K113 K125
13929-
0x80000000, // 0014 RET 0
13917+
0x7812000B, // 0008 JMPF R4 #0015
13918+
0x88100104, // 0009 GETMBR R4 R0 K4
13919+
0x90020604, // 000A SETMBR R0 K3 R4
13920+
0x8C100170, // 000B GETMET R4 R0 K112
13921+
0x5C180600, // 000C MOVE R6 R3
13922+
0x7C100400, // 000D CALL R4 2
13923+
0x8C100173, // 000E GETMET R4 R0 K115
13924+
0x5C180600, // 000F MOVE R6 R3
13925+
0x881C0105, // 0010 GETMBR R7 R0 K5
13926+
0x88200103, // 0011 GETMBR R8 R0 K3
13927+
0x941C0E08, // 0012 GETIDX R7 R7 R8
13928+
0x7C100600, // 0013 CALL R4 3
13929+
0x70020000, // 0014 JMP #0016
13930+
0xB006E37D, // 0015 RAISE 1 K113 K125
13931+
0x80000000, // 0016 RET 0
1393013932
})
1393113933
)
1393213934
);

0 commit comments

Comments
 (0)