|
@ -213,7 +213,7 @@ xyze_float_t Planner::previous_speed; |
|
|
float Planner::previous_nominal_speed_sqr; |
|
|
float Planner::previous_nominal_speed_sqr; |
|
|
|
|
|
|
|
|
#if ENABLED(DISABLE_INACTIVE_EXTRUDER) |
|
|
#if ENABLED(DISABLE_INACTIVE_EXTRUDER) |
|
|
uint8_t Planner::g_uc_extruder_last_move[EXTRUDERS] = { 0 }; |
|
|
last_move_t Planner::g_uc_extruder_last_move[EXTRUDERS] = { 0 }; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifdef XY_FREQUENCY_LIMIT |
|
|
#ifdef XY_FREQUENCY_LIMIT |
|
@ -2037,22 +2037,20 @@ bool Planner::_populate_block(block_t * const block, bool split_move, |
|
|
#if ENABLED(DISABLE_INACTIVE_EXTRUDER) // Enable only the selected extruder
|
|
|
#if ENABLED(DISABLE_INACTIVE_EXTRUDER) // Enable only the selected extruder
|
|
|
|
|
|
|
|
|
LOOP_L_N(i, EXTRUDERS) |
|
|
LOOP_L_N(i, EXTRUDERS) |
|
|
if (g_uc_extruder_last_move[i] > 0) g_uc_extruder_last_move[i]--; |
|
|
if (g_uc_extruder_last_move[i]) g_uc_extruder_last_move[i]--; |
|
|
|
|
|
|
|
|
#if HAS_DUPLICATION_MODE |
|
|
|
|
|
if (extruder_duplication_enabled && extruder == 0) { |
|
|
|
|
|
ENABLE_AXIS_E1(); |
|
|
|
|
|
g_uc_extruder_last_move[1] = (BLOCK_BUFFER_SIZE) * 2; |
|
|
|
|
|
} |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#define ENABLE_ONE_E(N) do{ \ |
|
|
#define ENABLE_ONE_E(N) do{ \ |
|
|
if (extruder == N) { \ |
|
|
if (extruder == N) { \ |
|
|
ENABLE_AXIS_E##N(); \ |
|
|
ENABLE_AXIS_E##N(); \ |
|
|
g_uc_extruder_last_move[N] = (BLOCK_BUFFER_SIZE) * 2; \ |
|
|
g_uc_extruder_last_move[N] = (BLOCK_BUFFER_SIZE) * 2; \ |
|
|
|
|
|
if ((N) == 0 && TERN0(HAS_DUPLICATION_MODE, extruder_duplication_enabled)) \ |
|
|
|
|
|
ENABLE_AXIS_E1(); \ |
|
|
} \ |
|
|
} \ |
|
|
else if (!g_uc_extruder_last_move[N]) \ |
|
|
else if (!g_uc_extruder_last_move[N]) { \ |
|
|
DISABLE_AXIS_E##N(); \ |
|
|
DISABLE_AXIS_E##N(); \ |
|
|
|
|
|
if ((N) == 0 && TERN0(HAS_DUPLICATION_MODE, extruder_duplication_enabled)) \ |
|
|
|
|
|
DISABLE_AXIS_E1(); \ |
|
|
|
|
|
} \ |
|
|
}while(0); |
|
|
}while(0); |
|
|
|
|
|
|
|
|
#else |
|
|
#else |
|
|