|
@@ -1687,7 +1687,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
1687
|
1687
|
}
|
1688
|
1688
|
#endif // PREVENT_COLD_EXTRUSION
|
1689
|
1689
|
#if ENABLED(PREVENT_LENGTHY_EXTRUDE)
|
1690
|
|
- if (ABS(de * e_factor[extruder]) > (int32_t)axis_steps_per_mm[E_AXIS_N] * (EXTRUDE_MAXLENGTH)) { // It's not important to get max. extrusion length in a precision < 1mm, so save some cycles and cast to int
|
|
1690
|
+ if (ABS(de * e_factor[extruder]) > (int32_t)axis_steps_per_mm[E_AXIS_N(extruder)] * (EXTRUDE_MAXLENGTH)) { // It's not important to get max. extrusion length in a precision < 1mm, so save some cycles and cast to int
|
1691
|
1691
|
position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
|
1692
|
1692
|
#if HAS_POSITION_FLOAT
|
1693
|
1693
|
position_float[E_AXIS] = target_float[E_AXIS];
|
|
@@ -1985,7 +1985,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
1985
|
1985
|
delta_mm[B_AXIS] = db * steps_to_mm[B_AXIS];
|
1986
|
1986
|
delta_mm[C_AXIS] = dc * steps_to_mm[C_AXIS];
|
1987
|
1987
|
#endif
|
1988
|
|
- delta_mm[E_AXIS] = esteps_float * steps_to_mm[E_AXIS_N];
|
|
1988
|
+ delta_mm[E_AXIS] = esteps_float * steps_to_mm[E_AXIS_N(extruder)];
|
1989
|
1989
|
|
1990
|
1990
|
if (block->steps[A_AXIS] < MIN_STEPS_PER_SEGMENT && block->steps[B_AXIS] < MIN_STEPS_PER_SEGMENT && block->steps[C_AXIS] < MIN_STEPS_PER_SEGMENT) {
|
1991
|
1991
|
block->millimeters = ABS(delta_mm[E_AXIS]);
|
|
@@ -2254,7 +2254,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
2254
|
2254
|
#endif
|
2255
|
2255
|
#if ENABLED(LIN_ADVANCE)
|
2256
|
2256
|
if (block->use_advance_lead) {
|
2257
|
|
- block->advance_speed = (STEPPER_TIMER_RATE) / (extruder_advance_K[active_extruder] * block->e_D_ratio * block->acceleration * axis_steps_per_mm[E_AXIS_N]);
|
|
2257
|
+ block->advance_speed = (STEPPER_TIMER_RATE) / (extruder_advance_K[active_extruder] * block->e_D_ratio * block->acceleration * axis_steps_per_mm[E_AXIS_N(extruder)]);
|
2258
|
2258
|
#if ENABLED(LA_DEBUG)
|
2259
|
2259
|
if (extruder_advance_K[active_extruder] * block->e_D_ratio * block->acceleration * 2 < SQRT(block->nominal_speed_sqr) * block->e_D_ratio)
|
2260
|
2260
|
SERIAL_ECHOLNPGM("More than 2 steps per eISR loop executed.");
|
|
@@ -2566,8 +2566,8 @@ bool Planner::buffer_segment(const float &a, const float &b, const float &c, con
|
2566
|
2566
|
|
2567
|
2567
|
// When changing extruders recalculate steps corresponding to the E position
|
2568
|
2568
|
#if ENABLED(DISTINCT_E_FACTORS)
|
2569
|
|
- if (last_extruder != extruder && axis_steps_per_mm[E_AXIS_N] != axis_steps_per_mm[E_AXIS + last_extruder]) {
|
2570
|
|
- position[E_AXIS] = LROUND(position[E_AXIS] * axis_steps_per_mm[E_AXIS_N] * steps_to_mm[E_AXIS + last_extruder]);
|
|
2569
|
+ if (last_extruder != extruder && axis_steps_per_mm[E_AXIS_N(extruder)] != axis_steps_per_mm[E_AXIS + last_extruder]) {
|
|
2570
|
+ position[E_AXIS] = LROUND(position[E_AXIS] * axis_steps_per_mm[E_AXIS_N(extruder)] * steps_to_mm[E_AXIS + last_extruder]);
|
2571
|
2571
|
last_extruder = extruder;
|
2572
|
2572
|
}
|
2573
|
2573
|
#endif
|
|
@@ -2578,7 +2578,7 @@ bool Planner::buffer_segment(const float &a, const float &b, const float &c, con
|
2578
|
2578
|
LROUND(a * axis_steps_per_mm[A_AXIS]),
|
2579
|
2579
|
LROUND(b * axis_steps_per_mm[B_AXIS]),
|
2580
|
2580
|
LROUND(c * axis_steps_per_mm[C_AXIS]),
|
2581
|
|
- LROUND(e * axis_steps_per_mm[E_AXIS_N])
|
|
2581
|
+ LROUND(e * axis_steps_per_mm[E_AXIS_N(extruder)])
|
2582
|
2582
|
};
|
2583
|
2583
|
|
2584
|
2584
|
#if HAS_POSITION_FLOAT
|