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