I have a code in LVGL 8.3 that uses lv_label_set_text_fmt to show a float number in a Label object.
up to LVGL 8.3, I was enabling the #define LV_SPRINTF_USE_FLOAT 1 in the lv_conf.h, however there is nothing like this in the config file of the LVGL-9.0, what should I do?
In my test, using v9.5, the only thing required was to change the LV_USE_FLOAT define #define LV_USE_FLOAT 1 in lv_conf.h, no more code changes where required.
If I do that, and open the file lvgl\src\stdlib\builtin\lv_sprintf_builtin.c on lines 776~794 i see in the IDE that the code is no longer “disabled” and lv_label_set_text_fmt works with %f ov lv_snprintf.
If using the standard lib, make sure you have enabled float support on compiler definition, since it may be optional depending on the compiler library in use…