Fix circle arc condition (#20322)

This commit is contained in:
yysh12 2020-12-03 04:40:39 -06:00 committed by Scott Lahteine
parent 07954edadc
commit eba2937715

View File

@ -87,7 +87,7 @@ void plan_arc(
#endif #endif
// Do a full circle if angular rotation is near 0 and the target is current position // Do a full circle if angular rotation is near 0 and the target is current position
if ((!angular_travel || NEAR_ZERO(angular_travel)) && NEAR(current_position[p_axis], cart[p_axis]) && NEAR(current_position[q_axis], cart[q_axis])) { if (!angular_travel || (NEAR_ZERO(angular_travel) && NEAR(current_position[p_axis], cart[p_axis]) && NEAR(current_position[q_axis], cart[q_axis]))) {
// Preserve direction for circles // Preserve direction for circles
angular_travel = clockwise ? -RADIANS(360) : RADIANS(360); angular_travel = clockwise ? -RADIANS(360) : RADIANS(360);
} }