|
@@ -2207,23 +2207,23 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
2207
|
2207
|
|
2208
|
2208
|
#if ENABLED(DISABLE_INACTIVE_EXTRUDER) // Enable only the selected extruder
|
2209
|
2209
|
|
|
2210
|
+ // Count down all steppers that were recently moved
|
2210
|
2211
|
LOOP_L_N(i, E_STEPPERS)
|
2211
|
2212
|
if (g_uc_extruder_last_move[i]) g_uc_extruder_last_move[i]--;
|
2212
|
2213
|
|
|
2214
|
+ // Switching Extruder uses one E stepper motor per two nozzles
|
2213
|
2215
|
#define E_STEPPER_INDEX(E) TERN(SWITCHING_EXTRUDER, (E) / 2, E)
|
2214
|
2216
|
|
|
2217
|
+ // Enable all (i.e., both) E steppers for IDEX-style duplication, but only active E steppers for multi-nozzle (i.e., single wide X carriage) duplication
|
|
2218
|
+ #define _IS_DUPE(N) TERN0(HAS_DUPLICATION_MODE, (extruder_duplication_enabled && TERN1(MULTI_NOZZLE_DUPLICATION, TEST(duplication_e_mask, N))))
|
|
2219
|
+
|
2215
|
2220
|
#define ENABLE_ONE_E(N) do{ \
|
2216
|
|
- if (E_STEPPER_INDEX(extruder) == N) { \
|
2217
|
|
- stepper.ENABLE_EXTRUDER(N); \
|
2218
|
|
- g_uc_extruder_last_move[N] = (BLOCK_BUFFER_SIZE) * 2; \
|
2219
|
|
- if ((N) == 0 && TERN0(HAS_DUPLICATION_MODE, extruder_duplication_enabled)) \
|
2220
|
|
- stepper.ENABLE_EXTRUDER(1); \
|
2221
|
|
- } \
|
2222
|
|
- else if (!g_uc_extruder_last_move[N]) { \
|
2223
|
|
- stepper.DISABLE_EXTRUDER(N); \
|
2224
|
|
- if ((N) == 0 && TERN0(HAS_DUPLICATION_MODE, extruder_duplication_enabled)) \
|
2225
|
|
- stepper.DISABLE_EXTRUDER(1); \
|
|
2221
|
+ if (N == E_STEPPER_INDEX(extruder) || _IS_DUPE(N)) { /* N is 'extruder', or N is duplicating */ \
|
|
2222
|
+ stepper.ENABLE_EXTRUDER(N); /* Enable the relevant E stepper... */ \
|
|
2223
|
+ g_uc_extruder_last_move[N] = (BLOCK_BUFFER_SIZE) * 2; /* ...and reset its counter */ \
|
2226
|
2224
|
} \
|
|
2225
|
+ else if (!g_uc_extruder_last_move[N]) /* Counter expired since last E stepper enable */ \
|
|
2226
|
+ stepper.DISABLE_EXTRUDER(N); /* Disable the E stepper */ \
|
2227
|
2227
|
}while(0);
|
2228
|
2228
|
|
2229
|
2229
|
#else
|