Syntax cleanup

This commit is contained in:
Scott Lahteine 2017-03-31 15:08:08 -05:00
parent b47fd31c37
commit 79d42d87c1

View file

@ -1141,16 +1141,16 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
// Limit acceleration per axis // Limit acceleration per axis
if (block->step_event_count <= cutoff_long) { if (block->step_event_count <= cutoff_long) {
LIMIT_ACCEL_LONG(X_AXIS,0); LIMIT_ACCEL_LONG(X_AXIS, 0);
LIMIT_ACCEL_LONG(Y_AXIS,0); LIMIT_ACCEL_LONG(Y_AXIS, 0);
LIMIT_ACCEL_LONG(Z_AXIS,0); LIMIT_ACCEL_LONG(Z_AXIS, 0);
LIMIT_ACCEL_LONG(E_AXIS,ACCEL_IDX); LIMIT_ACCEL_LONG(E_AXIS, ACCEL_IDX);
} }
else { else {
LIMIT_ACCEL_FLOAT(X_AXIS,0); LIMIT_ACCEL_FLOAT(X_AXIS, 0);
LIMIT_ACCEL_FLOAT(Y_AXIS,0); LIMIT_ACCEL_FLOAT(Y_AXIS, 0);
LIMIT_ACCEL_FLOAT(Z_AXIS,0); LIMIT_ACCEL_FLOAT(Z_AXIS, 0);
LIMIT_ACCEL_FLOAT(E_AXIS,ACCEL_IDX); LIMIT_ACCEL_FLOAT(E_AXIS, ACCEL_IDX);
} }
} }
block->acceleration_steps_per_s2 = accel; 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_exit *= v_factor;
v_entry *= v_factor; v_entry *= v_factor;
} }
// Calculate jerk depending on whether the axis is coasting in the same direction or reversing. // Calculate jerk depending on whether the axis is coasting in the same direction or reversing.
const float jerk = (v_exit > v_entry) const float jerk = (v_exit > v_entry)
? // coasting axis reversal ? // coasting axis reversal