From 6f38814541cca35840555ed24cf30aeadbb78c9d Mon Sep 17 00:00:00 2001 From: Bob-the-Kuhn Date: Fri, 8 Dec 2017 18:02:57 -0600 Subject: [PATCH] speed improvement --- Marlin/planner.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index e01c3f68d5..ab70107173 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -1081,7 +1081,8 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE], float fr_mm_s, const float max_stepper_speed = 0, min_axis_accel_ratio = 1; // ratio < 1 means acceleration ramp needed LOOP_XYZE(i) { const float cs = FABS((current_speed[i] = delta_mm[i] * inverse_secs)); - NOMORE(min_axis_accel_ratio, max_jerk[i] / cs); + if (cs > max_jerk[i]) + NOMORE(min_axis_accel_ratio, max_jerk[i] / cs); NOLESS(max_stepper_speed, cs); #if ENABLED(DISTINCT_E_FACTORS) if (i == E_AXIS) i += extruder;