Description
What MCU/Processor/Board and compiler are you using?
ESP32+TFT_espi+Arduino on PlatformIO
What LVGL version are you using?
8.3.4
What do you want to achieve?
I tried to add an lv_arc to the demo_keypad_encoder example
What have you tried so far?
Adding to the group did not work for lv_arcs (I copied and adapted the code from the online manual). The arc is drawn, but it gets no focus. It’s more like “OK, I know now, that I selected the arc, now I can turn the know to change its value”
So:
arc → no focus visible, can change the value blindly
Code to reproduce
static void selectors_create(lv_obj_t * parent)
{
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
lv_obj_set_flex_align(parent, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);
lv_obj_t * obj;
obj = lv_spinbox_create(parent);
lv_obj_add_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
obj = lv_label_create(parent);
lv_label_set_text(obj, "Speed simulation");
lv_obj_add_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
obj = lv_switch_create(parent);
lv_obj_add_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
obj = lv_label_create(parent);
lv_label_set_text(obj, "Speed");
lv_obj_add_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
obj = lv_bar_create(parent);
lv_obj_set_size(obj, 200, 20);
lv_obj_center(obj);
lv_bar_set_value(obj, 70, LV_ANIM_OFF);
lv_obj_add_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
lv_group_add_obj(g, obj);
obj = lv_label_create(parent);
lv_label_set_text(obj, "Volume");
lv_obj_add_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
obj = lv_arc_create(parent);
lv_arc_set_range(obj, 0, 64);
lv_obj_add_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
lv_group_add_obj(g, obj);
obj = lv_label_create(parent);
lv_label_set_text(obj, "Start DOOM");
obj = lv_switch_create(parent);
lv_obj_add_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
}