Skip to content

Commit

Permalink
Fix circle arc condition (MarlinFirmware#20322)
Browse files Browse the repository at this point in the history
  • Loading branch information
yysh12 authored and mriscoc committed Dec 5, 2020
1 parent 5e7d15d commit be7cccb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/gcode/motion/G2_G3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void plan_arc(
#endif

// 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
angular_travel = clockwise ? -RADIANS(360) : RADIANS(360);
}
Expand Down

0 comments on commit be7cccb

Please sign in to comment.