Important: unclear posts may not receive useful answers.
Before posting
Get familiar with Markdown to format and structure your post
Be sure to update lvgl from the latest version from the master branch.
Be sure you have checked the relevant part of the documentation.
If applicable use the Simulator to eliminate hardware related issues.
Delete this section if you read and applied the mentioned points.
Description
I set local values for two LEDs, but the values are not as intended.
What MCU/Processor/Board and compiler are you using?
Visual studio 2019
What LVGL version are you using?
7.10
What do you want to achieve?
What have you tried so far?
Code to reproduce
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like: main.c (15.8 KB)
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.
I agree with @embeddedt. You need to make your buffers persistent beyond the scope of this function, too. From the style docs
value_str ( const char * ): Pointer to text to display. Only the pointer is saved! (Don’t use local variable with lv_style_set_value_str, instead use static, global or dynamically allocated data).