I have a problem: I have a small project, a Screen1 which, among other things, contains a Slider and a Label. I want that when the Slider moves, its value in the range is displayed in a Label (Label3 from the same screen) but through the Call Function event, not through the Value Changes trigger - SET TEXT VALUE FROM with the Label3 target (set through the application interface) .
Here is the function from ui.c with the reason:
void ui_event_Screen1_Slider2(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(s);
lv_obj_t * target = lv_event_get_target(s);
if (event_code == LV_EVENT_VALUE_CHANGED) {
color_doi(s);
}
}
and in ui_events.c I have:
#include “ui.h”
void color_doi(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(s);
lv_obj_t * target = lv_event_get_value(s);
if (event_code == LV_EVENT_VALUE_CHANGED) {
_ui_slider_set_text_value(ui_Screen1_Label3, target, “”, “5”);
}
}
I move the slider (that is, I change its value), but the value of Label3 remains unchanged. Can you help me with an advice, some settings need to be made that I don’t know.