|
|
|
@ -164,7 +164,7 @@ float Planner::steps_to_mm[DISTINCT_AXES]; // (mm) Millimeters per step
|
|
|
|
|
xyze_bool_t Planner::last_page_dir{0};
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if EXTRUDERS
|
|
|
|
|
#if HAS_EXTRUDERS
|
|
|
|
|
int16_t Planner::flow_percentage[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(100); // Extrusion factor for each extruder
|
|
|
|
|
float Planner::e_factor[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(1.0f); // The flow percentage and volumetric multiplier combine to scale E movement
|
|
|
|
|
#endif
|
|
|
|
@ -1836,7 +1836,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
|
|
|
|
db = target.b - position.b,
|
|
|
|
|
dc = target.c - position.c;
|
|
|
|
|
|
|
|
|
|
#if EXTRUDERS
|
|
|
|
|
#if HAS_EXTRUDERS
|
|
|
|
|
int32_t de = target.e - position.e;
|
|
|
|
|
#else
|
|
|
|
|
constexpr int32_t de = 0;
|
|
|
|
@ -1848,7 +1848,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
|
|
|
|
" A:", target.a, " (", da, " steps)"
|
|
|
|
|
" B:", target.b, " (", db, " steps)"
|
|
|
|
|
" C:", target.c, " (", dc, " steps)"
|
|
|
|
|
#if EXTRUDERS
|
|
|
|
|
#if HAS_EXTRUDERS
|
|
|
|
|
" E:", target.e, " (", de, " steps)"
|
|
|
|
|
#endif
|
|
|
|
|
);
|
|
|
|
@ -1921,7 +1921,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
|
|
|
|
#endif
|
|
|
|
|
if (de < 0) SBI(dm, E_AXIS);
|
|
|
|
|
|
|
|
|
|
#if EXTRUDERS
|
|
|
|
|
#if HAS_EXTRUDERS
|
|
|
|
|
const float esteps_float = de * e_factor[extruder];
|
|
|
|
|
const uint32_t esteps = ABS(esteps_float) + 0.5f;
|
|
|
|
|
#else
|
|
|
|
@ -2003,7 +2003,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
|
|
|
|
steps_dist_mm.c = dc * steps_to_mm[C_AXIS];
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if EXTRUDERS
|
|
|
|
|
#if HAS_EXTRUDERS
|
|
|
|
|
steps_dist_mm.e = esteps_float * steps_to_mm[E_AXIS_N(extruder)];
|
|
|
|
|
#else
|
|
|
|
|
steps_dist_mm.e = 0.0f;
|
|
|
|
@ -2013,7 +2013,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
|
|
|
|
|
|
|
|
|
if (block->steps.a < MIN_STEPS_PER_SEGMENT && block->steps.b < MIN_STEPS_PER_SEGMENT && block->steps.c < MIN_STEPS_PER_SEGMENT) {
|
|
|
|
|
block->millimeters = (0
|
|
|
|
|
#if EXTRUDERS
|
|
|
|
|
#if HAS_EXTRUDERS
|
|
|
|
|
+ ABS(steps_dist_mm.e)
|
|
|
|
|
#endif
|
|
|
|
|
);
|
|
|
|
@ -2046,7 +2046,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
|
|
|
|
TERN_(BACKLASH_COMPENSATION, backlash.add_correction_steps(da, db, dc, dm, block));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if EXTRUDERS
|
|
|
|
|
#if HAS_EXTRUDERS
|
|
|
|
|
block->steps.e = esteps;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@ -2107,7 +2107,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// Enable extruder(s)
|
|
|
|
|
#if EXTRUDERS
|
|
|
|
|
#if HAS_EXTRUDERS
|
|
|
|
|
if (esteps) {
|
|
|
|
|
TERN_(AUTO_POWER_CONTROL, powerManager.power_on());
|
|
|
|
|
|
|
|
|
@ -2209,7 +2209,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Limit speed on extruders, if any
|
|
|
|
|
#if EXTRUDERS
|
|
|
|
|
#if HAS_EXTRUDERS
|
|
|
|
|
{
|
|
|
|
|
current_speed.e = steps_dist_mm.e * inverse_secs;
|
|
|
|
|
#if HAS_MIXER_SYNC_CHANNEL
|
|
|
|
|