Description
Hi, I am using EEZ Studio to generate LVGL code for display and having problem with lv_roller_set_selected
function.
What MCU/Processor/Board and compiler are you using?
ESP32 / Arduino framework
What LVGL version are you using?
8.3
What do you want to achieve?
When using this function:
lv_roller_set_selected(objects.source_picker, sourcePosition, LV_ANIM_OFF);
I can change the roller items with rotary encoder without a problem, but if I try LV_ANIM_ON
there is no animation and the roller cant move.
This is the generated code for a roller in the screens.c file:
lv_obj_t *parent_obj = obj;
{
// sourcePicker
lv_obj_t *obj = lv_roller_create(parent_obj);
objects.source_picker = obj;
lv_obj_set_pos(obj, 138, 37);
lv_obj_set_size(obj, 161, 160);
lv_roller_set_options(obj, "AUX 1\nAUX 2\nAUX 3", LV_ROLLER_MODE_NORMAL);
lv_obj_add_flag(obj, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_set_style_bg_color(obj, lv_color_hex(0xff0d0d0d), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_border_color(obj, lv_color_hex(0xff000000), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(obj, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_align(obj, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xff212121), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_anim_time(obj, 200, 0);
}