Account for indev drag limit
@@ -409,6 +409,9 @@ static lv_res_t lv_rotary_signal(lv_obj_t * rotary, lv_signal_t sign, void * par
}
else if(sign == LV_SIGNAL_PRESSING) {
+ lv_indev_t * indev = lv_indev_get_act();
+ if(indev == NULL) return res;
+
lv_indev_get_point(param, &p);
lv_coord_t drag_x_diff = p.x -ext->last_drag_x;
@@ -416,6 +419,7 @@ static lv_res_t lv_rotary_signal(lv_obj_t * rotary, lv_signal_t sign, void * par
if (drag_x_diff > 0) drag_x_diff = ext->threshold;
else drag_x_diff = -ext->threshold;
}
+ if (LV_MATH_ABS(drag_x_diff) > indev->driver.drag_limit) {
ext->last_drag_x = p.x;
if (ext->knob_area.y1 < p.y && p.y < ext->knob_area.y2) {
@@ -431,7 +435,7 @@ static lv_res_t lv_rotary_signal(lv_obj_t * rotary, lv_signal_t sign, void * par
if(res != LV_RES_OK) return res;
}
}
-
+ }
}
else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) {
ext->dragging = false;
