From cba31acb76e504954302f7045306a36a8b428eb7 Mon Sep 17 00:00:00 2001 From: midopple Date: Tue, 14 Feb 2012 18:55:26 +0100 Subject: Changed check in arc_func if (millimeters_of_travel == 0.0) => if (millimeters_of_travel < 0.001) (thanks mooselake) --- Sprinter/arc_func.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprinter/arc_func.cpp b/Sprinter/arc_func.cpp index d088337..255129f 100644 --- a/Sprinter/arc_func.cpp +++ b/Sprinter/arc_func.cpp @@ -48,7 +48,7 @@ void mc_arc(float *position, float *target, float *offset, uint8_t axis_0, uint8 if (isclockwise) { angular_travel -= 2*M_PI; } float millimeters_of_travel = hypot(angular_travel*radius, fabs(linear_travel)); - if (millimeters_of_travel == 0.0) { return; } + if (millimeters_of_travel < 0.001) { return; } uint16_t segments = floor(millimeters_of_travel/MM_PER_ARC_SEGMENT); /* // Multiply inverse feed_rate to compensate for the fact that this movement is approximated -- cgit v1.2.1