|
|
|
@ -1062,6 +1062,9 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
|
|
|
|
float current_speed[NUM_AXIS], speed_factor = 1.0; // factor <1 decreases speed
|
|
|
|
|
LOOP_XYZE(i) {
|
|
|
|
|
const float cs = fabs(current_speed[i] = delta_mm[i] * inverse_mm_s);
|
|
|
|
|
#if ENABLED(DISTINCT_E_FACTORS)
|
|
|
|
|
if (i == E_AXIS) i += extruder;
|
|
|
|
|
#endif
|
|
|
|
|
if (cs > max_feedrate_mm_s[i]) NOMORE(speed_factor, max_feedrate_mm_s[i] / cs);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1135,18 +1138,24 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
|
|
|
|
// Start with print or travel acceleration
|
|
|
|
|
accel = ceil((esteps ? acceleration : travel_acceleration) * steps_per_mm);
|
|
|
|
|
|
|
|
|
|
#if ENABLED(DISTINCT_E_FACTORS)
|
|
|
|
|
#define ACCEL_IDX extruder
|
|
|
|
|
#else
|
|
|
|
|
#define ACCEL_IDX 0
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// 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,extruder);
|
|
|
|
|
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,extruder);
|
|
|
|
|
LIMIT_ACCEL_FLOAT(E_AXIS,ACCEL_IDX);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
block->acceleration_steps_per_s2 = accel;
|
|
|
|
|