lvgl 9.5.0 run on PC visual studio.
void lv_example_arc_1(void)
{
lv_obj_t * label = lv_label_create(lv_screen_active());
/*Create an Arc*/
lv_obj_t * arc = lv_arc_create(lv_screen_active());
lv_obj_set_size(arc, 150, 150);
lv_arc_set_rotation(arc, 135);
lv_arc_set_bg_angles(arc, 0, 270);
// lv_arc_set_value(arc, 10);
lv_arc_set_range(arc, 0, 10);
lv_arc_set_value(arc, 5);
lv_obj_center(arc);
lv_obj_add_event_cb(arc, value_changed_event_cb, LV_EVENT_VALUE_CHANGED, label);
/*Manually update the label for the first time*/
lv_obj_send_event(arc, LV_EVENT_VALUE_CHANGED, NULL);
}
This codes just changed a little bit base on the original example, setting the arc range from 0 to 10. And I found that after changing the value to 0 or 10, it is not possible to set another value via “pointer_indev” (mouse).