How to turn off LVGL unplug Alert

Hey, I was wondering if there is a way to turn off the LVGL alert system for when devices are unplugged.
1069B - Agronauts

1 Like

Unfortunately, this can not be removed by the user.
This double warning issue is already explained here.


Actually there is a way to get around that message.

The message is simply done through lvgl, which you have full control of. It is possible to basically ignore the message by forcing your content to display above the message. You need to create a page or object to use instead of the lv_scr_act() (screen object). Then whenever you call lv_obj_set_parent on the page it will be brought to the foreground (this works for any objects)…

lv_obj_t * page = lv_page_create(lv_scr_act(), NULL);

lv_obj_set_size(page, LV_HOR_RES, LV_VER_RES);
//set page styling

//add you elements to page

    lv_obj_set_parent(page, lv_scr_act());//brings page to foreground

    //rest of code

Note that the difference between page and normal object is that a page has scrolling. Docs for page.


Is there a way to make this work for the LLEMU object that PROS provides?

I believe that a similar method could be used. The LLEMU is made using LVGL so all you would have to do is recreate the LLEMU on the defined page. The code for the LLEMU can be found here on the PROS GitHub.