From 59eb77fd28bd051354ed53f162de9e5620ea7cbc Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 4 Dec 2017 18:53:24 -0600 Subject: [PATCH] =?UTF-8?q?One=20fewer=20move=20required=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/planner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index c0eb2ca744..bcd7b6d5d8 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -1217,7 +1217,7 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE], float fr_mm_s, const vmax_junction = MINIMUM_PLANNER_SPEED; // Set default max junction speed // Skip first block or when previous_nominal_speed is used as a flag for homing and offset cycles. - if (moves_queued() && !UNEAR_ZERO(previous_nominal_speed)) { + if (moves_queued && !UNEAR_ZERO(previous_nominal_speed)) { // Compute cosine of angle between previous and current path. (prev_unit_vec is negative) // NOTE: Max junction velocity is computed without sin() or acos() by trig half angle identity. const float cos_theta = - previous_unit_vec[X_AXIS] * unit_vec[X_AXIS] @@ -1262,7 +1262,7 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE], float fr_mm_s, const } } - if (moves_queued > 1 && !UNEAR_ZERO(previous_nominal_speed)) { + if (moves_queued && !UNEAR_ZERO(previous_nominal_speed)) { // Estimate a maximum velocity allowed at a joint of two successive segments. // If this maximum velocity allowed is lower than the minimum of the entry / exit safe velocities, // then the machine is not coasting anymore and the safe entry / exit velocities shall be used.