diff options
author | midopple <mdoppler@gmx.at> | 2012-02-14 18:55:26 +0100 |
---|---|---|
committer | midopple <mdoppler@gmx.at> | 2012-02-14 18:55:26 +0100 |
commit | cba31acb76e504954302f7045306a36a8b428eb7 (patch) | |
tree | ea334db22c856bd4a25ad159d8074d0653b6a866 | |
parent | 7b21a2a055047490e6c1f7cba5d0fb18dbd38688 (diff) |
Changed check in arc_func
if (millimeters_of_travel == 0.0) => if (millimeters_of_travel < 0.001)
(thanks mooselake)
-rw-r--r-- | Sprinter/arc_func.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 |