🧑💻 Width/Magnitude-based types (#25458)
This commit is contained in:
@@ -216,7 +216,7 @@ xyze_float_t Planner::previous_speed;
|
||||
float Planner::previous_nominal_speed;
|
||||
|
||||
#if ENABLED(DISABLE_INACTIVE_EXTRUDER)
|
||||
last_move_t Planner::g_uc_extruder_last_move[E_STEPPERS] = { 0 };
|
||||
last_move_t Planner::extruder_last_move[E_STEPPERS] = { 0 };
|
||||
#endif
|
||||
|
||||
#ifdef XY_FREQUENCY_LIMIT
|
||||
@@ -2280,7 +2280,7 @@ bool Planner::_populate_block(
|
||||
|
||||
// Count down all steppers that were recently moved
|
||||
LOOP_L_N(i, E_STEPPERS)
|
||||
if (g_uc_extruder_last_move[i]) g_uc_extruder_last_move[i]--;
|
||||
if (extruder_last_move[i]) extruder_last_move[i]--;
|
||||
|
||||
// Switching Extruder uses one E stepper motor per two nozzles
|
||||
#define E_STEPPER_INDEX(E) TERN(HAS_SWITCHING_EXTRUDER, (E) / 2, E)
|
||||
@@ -2289,12 +2289,12 @@ bool Planner::_populate_block(
|
||||
#define _IS_DUPE(N) TERN0(HAS_DUPLICATION_MODE, (extruder_duplication_enabled && TERN1(MULTI_NOZZLE_DUPLICATION, TEST(duplication_e_mask, N))))
|
||||
|
||||
#define ENABLE_ONE_E(N) do{ \
|
||||
if (N == E_STEPPER_INDEX(extruder) || _IS_DUPE(N)) { /* N is 'extruder', or N is duplicating */ \
|
||||
stepper.ENABLE_EXTRUDER(N); /* Enable the relevant E stepper... */ \
|
||||
g_uc_extruder_last_move[N] = (BLOCK_BUFFER_SIZE) * 2; /* ...and reset its counter */ \
|
||||
if (N == E_STEPPER_INDEX(extruder) || _IS_DUPE(N)) { /* N is 'extruder', or N is duplicating */ \
|
||||
stepper.ENABLE_EXTRUDER(N); /* Enable the relevant E stepper... */ \
|
||||
extruder_last_move[N] = (BLOCK_BUFFER_SIZE) * 2; /* ...and reset its counter */ \
|
||||
} \
|
||||
else if (!g_uc_extruder_last_move[N]) /* Counter expired since last E stepper enable */ \
|
||||
stepper.DISABLE_EXTRUDER(N); /* Disable the E stepper */ \
|
||||
else if (!extruder_last_move[N]) /* Counter expired since last E stepper enable */ \
|
||||
stepper.DISABLE_EXTRUDER(N); /* Disable the E stepper */ \
|
||||
}while(0);
|
||||
|
||||
#else
|
||||
|
Reference in New Issue
Block a user