From this post I tried but I still can compile the sketch.
https://forum.lvgl.io/t/how-to-get-name-of-the-active-screen/10698
I wanted to get something like 0,1,2,3,4,5
from active screen ui_Screen1,ui_Screen2,ui_Screen3,ui_Screen4,ui_Screen5
From this post I tried but I still can compile the sketch.
https://forum.lvgl.io/t/how-to-get-name-of-the-active-screen/10698
I wanted to get something like 0,1,2,3,4,5
from active screen ui_Screen1,ui_Screen2,ui_Screen3,ui_Screen4,ui_Screen5
In LVGL v9, object names can be set; this needs to be enabled in lv_conf.h
#define LV_USE_OBJ_NAME 1
lv_obj_set_name(ui_Screen1, "Screen1");
Later, you can get the name of the active screen
const char * screen_name = lv_obj_get_name(lv_screen_active());
LVGL Pro editor already assigns names to screens and components by default