This bit works - it compiles and it hides the spinner: lv_obj_add_flag(ui_TurningSpinner, LV_OBJ_FLAG_HIDDEN);
This bit gives a compilation error: lv_obj_update_flag(ui_TurningSpinner, LV_OBJ_FLAG_HIDDEN,false);
Compilation error: ‘lv_obj_update_flag’ was not declared in this scope
I tried using lv_obj_clear_flag but that didn’t seem to work - i.e. the spinner did not un-hide.
I had a good read through lv_conf.h to see if object flags were switched off by default but couldn’t see anything there.
I’m compiling on a Mac and using SquareLine Studio for generating the ui. I’m then adding a bit more code in Arduino IDE 2 before uploading to my controller.
ok this is happening with a lot more than just the above
lv_checkbox_set_checked also throws a compilation error
could this be something to do with memory allocation?
Hello, yes, it’s the version of LVGL that causes this. If you’re on Arduino like me then you’ve got 8.3 so you need to use compatible commands with 8.3 - such as:
lv_obj_clear_flag(ui_tempNow, LV_OBJ_FLAG_HIDDEN); // this makes object ui_tempNow visible
lv_obj_add_flag(ui_TurningSpinner, LV_OBJ_FLAG_HIDDEN); // this hides object ui_TurningSpinner
It’s worth noting that SquareLine Studio adds ui_ to the object names that you define when creating your UI, so accessing those objects directly in your code needs to take that into consideration as in the two examples above.