Description
I don’t get the expected output when I format the string as in the example code below.
What MCU/Processor/Board and compiler are you using?
VSCode, ESP-IDF, ESP32-Wroom-32E-Devkit4, IL9488 480x320, FT6X06.
I’m using [lv_port_esp32 @ 78428b8]
What do you experience?
The code compiles, and flashes. I put in
ESP_LOGI(TAG, "RAM left %d", esp_get_free_heap_size());
before and after the code and reports RAM left 107060. So I don’t think I am running out of ram.
What do you expect?
I expect to see “987.65” and not “f” on the LCD.
I have a dropdown on the same screen and responding as should. Other text labels are displaying just fine.
Code to reproduce
scale_readout = lv_label_create(parent, NULL);
lv_obj_add_style(scale_readout, LV_LABEL_PART_MAIN, &style_scale_medium);
lv_obj_align(scale_readout, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
lv_label_set_align(scale_readout, LV_LABEL_ALIGN_CENTER);
lv_label_set_text_fmt(scale_readout, "%.2f", 987.65);