diff --git a/lib/libesp32_lvgl/lv_binding_berry/generate/be_lv_c_mapping.h b/lib/libesp32_lvgl/lv_binding_berry/generate/be_lv_c_mapping.h index 7c99171d3..425bb7da1 100644 --- a/lib/libesp32_lvgl/lv_binding_berry/generate/be_lv_c_mapping.h +++ b/lib/libesp32_lvgl/lv_binding_berry/generate/be_lv_c_mapping.h @@ -899,7 +899,7 @@ const be_ntv_func_def_t lv_label_func[] = { { "get_letter_pos", { (const void*) &lv_label_get_letter_pos, "", "(lv.lv_obj)i(lv.lv_point)" } }, { "get_long_mode", { (const void*) &lv_label_get_long_mode, "i", "(lv.lv_obj)" } }, { "get_recolor", { (const void*) &lv_label_get_recolor, "b", "(lv.lv_obj)" } }, - { "get_text", { (const void*) &lv_label_get_text, "c", "(lv.lv_obj)" } }, + { "get_text", { (const void*) &lv_label_get_text, "s", "(lv.lv_obj)" } }, { "get_text_selection_end", { (const void*) &lv_label_get_text_selection_end, "i", "(lv.lv_obj)" } }, { "get_text_selection_start", { (const void*) &lv_label_get_text_selection_start, "i", "(lv.lv_obj)" } }, { "ins_text", { (const void*) &lv_label_ins_text, "", "(lv.lv_obj)is" } }, diff --git a/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py b/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py index a8f4ba4ad..e3df18958 100644 --- a/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py +++ b/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py @@ -38,6 +38,7 @@ return_types = { "char *": "c", "uint8_t *": "c", "const char *": "s", + "retchar *": "s", "constchar *": "s", # special construct "lv_obj_user_data_t": "i", @@ -245,6 +246,7 @@ with open(lv_widgets_file) as f: l_raw = re.sub('static ', '', l_raw) l_raw = re.sub('inline ', '', l_raw) l_raw = re.sub('const\s+char\s*\*', 'constchar *', l_raw) + l_raw = re.sub('^char\s*\*', 'retchar *', l_raw) # special case for returning a char* l_raw = re.sub('const ', '', l_raw) l_raw = re.sub('struct ', '', l_raw) if (len(l_raw) == 0): continue diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota_global.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota_global.ino index 417bac186..854b3522c 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota_global.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota_global.ino @@ -36,6 +36,7 @@ extern "C" { 4, /* number of elements */ nullptr, (const be_ctypes_structure_item_t[4]) { + // Warning: fields below need to be in alphabetical order { "devices_present", offsetof(TasmotaGlobal_t, devices_present), 0, 0, ctypes_u8, 0 }, { "fast_loop_enabled", offsetof(TasmotaGlobal_t, berry_fast_loop_enabled), 0, 0, ctypes_u8, 0 }, { "restart_flag", offsetof(TasmotaGlobal_t, restart_flag), 0, 0, ctypes_u8, 0 }, @@ -47,10 +48,11 @@ extern "C" { 2, /* number of elements */ nullptr, (const be_ctypes_structure_item_t[2]) { + // Warning: fields below need to be in alphabetical order { "bootcount", offsetof(TSettings, bootcount), 0, 0, ctypes_u16, 0 }, { "sleep", offsetof(TSettings, sleep), 0, 0, ctypes_u8, 0 }, }}; } -#endif // USE_BERRY \ No newline at end of file +#endif // USE_BERRY