About lv_label_set_text_fmt float

lv_label_set_text_fmt(label_current_x,"%f",0.545);

Wrong display character f

There is a setting for this in lv_conf.h.

I can’t find it. Can you tell me?

I don’t want to set font, I want to display floating point and the display character f

If you are not using a custom printf implementation:

If you are using a custom printf implementation, you will have to check its configuration.

2 Likes

Good thank you

Just an update for those using LVGL V9: I’ve run into this same issue, so here’s what fixes it now.

Set “LV_USE_FLOAT” in the config to 1.

/* Use `float` as `lv_value_precise_t` */
#define LV_USE_FLOAT            1