|
@@ -1062,6 +1062,9 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
1062
|
1062
|
float current_speed[NUM_AXIS], speed_factor = 1.0; // factor <1 decreases speed
|
1063
|
1063
|
LOOP_XYZE(i) {
|
1064
|
1064
|
const float cs = fabs(current_speed[i] = delta_mm[i] * inverse_mm_s);
|
|
1065
|
+ #if ENABLED(DISTINCT_E_FACTORS)
|
|
1066
|
+ if (i == E_AXIS) i += extruder;
|
|
1067
|
+ #endif
|
1065
|
1068
|
if (cs > max_feedrate_mm_s[i]) NOMORE(speed_factor, max_feedrate_mm_s[i] / cs);
|
1066
|
1069
|
}
|
1067
|
1070
|
|
|
@@ -1135,18 +1138,24 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
1135
|
1138
|
// Start with print or travel acceleration
|
1136
|
1139
|
accel = ceil((esteps ? acceleration : travel_acceleration) * steps_per_mm);
|
1137
|
1140
|
|
|
1141
|
+ #if ENABLED(DISTINCT_E_FACTORS)
|
|
1142
|
+ #define ACCEL_IDX extruder
|
|
1143
|
+ #else
|
|
1144
|
+ #define ACCEL_IDX 0
|
|
1145
|
+ #endif
|
|
1146
|
+
|
1138
|
1147
|
// Limit acceleration per axis
|
1139
|
1148
|
if (block->step_event_count <= cutoff_long) {
|
1140
|
1149
|
LIMIT_ACCEL_LONG(X_AXIS,0);
|
1141
|
1150
|
LIMIT_ACCEL_LONG(Y_AXIS,0);
|
1142
|
1151
|
LIMIT_ACCEL_LONG(Z_AXIS,0);
|
1143
|
|
- LIMIT_ACCEL_LONG(E_AXIS,extruder);
|
|
1152
|
+ LIMIT_ACCEL_LONG(E_AXIS,ACCEL_IDX);
|
1144
|
1153
|
}
|
1145
|
1154
|
else {
|
1146
|
1155
|
LIMIT_ACCEL_FLOAT(X_AXIS,0);
|
1147
|
1156
|
LIMIT_ACCEL_FLOAT(Y_AXIS,0);
|
1148
|
1157
|
LIMIT_ACCEL_FLOAT(Z_AXIS,0);
|
1149
|
|
- LIMIT_ACCEL_FLOAT(E_AXIS,extruder);
|
|
1158
|
+ LIMIT_ACCEL_FLOAT(E_AXIS,ACCEL_IDX);
|
1150
|
1159
|
}
|
1151
|
1160
|
}
|
1152
|
1161
|
block->acceleration_steps_per_s2 = accel;
|