From 79d42d87c1c71c9588e11863181a34250faaee43 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 31 Mar 2017 15:08:08 -0500 Subject: [PATCH] Syntax cleanup --- Marlin/planner.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index b252f95ef..4bf9ec5d6 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -1141,16 +1141,16 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const // Limit acceleration per axis if (block->step_event_count <= cutoff_long) { - LIMIT_ACCEL_LONG(X_AXIS,0); - LIMIT_ACCEL_LONG(Y_AXIS,0); - LIMIT_ACCEL_LONG(Z_AXIS,0); - LIMIT_ACCEL_LONG(E_AXIS,ACCEL_IDX); + LIMIT_ACCEL_LONG(X_AXIS, 0); + LIMIT_ACCEL_LONG(Y_AXIS, 0); + LIMIT_ACCEL_LONG(Z_AXIS, 0); + LIMIT_ACCEL_LONG(E_AXIS, ACCEL_IDX); } else { - LIMIT_ACCEL_FLOAT(X_AXIS,0); - LIMIT_ACCEL_FLOAT(Y_AXIS,0); - LIMIT_ACCEL_FLOAT(Z_AXIS,0); - LIMIT_ACCEL_FLOAT(E_AXIS,ACCEL_IDX); + LIMIT_ACCEL_FLOAT(X_AXIS, 0); + LIMIT_ACCEL_FLOAT(Y_AXIS, 0); + LIMIT_ACCEL_FLOAT(Z_AXIS, 0); + LIMIT_ACCEL_FLOAT(E_AXIS, ACCEL_IDX); } } block->acceleration_steps_per_s2 = accel; @@ -1256,6 +1256,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const v_exit *= v_factor; v_entry *= v_factor; } + // Calculate jerk depending on whether the axis is coasting in the same direction or reversing. const float jerk = (v_exit > v_entry) ? // coasting axis reversal