|
@@ -618,14 +618,20 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
618
|
618
|
#define _REV_E_DIR(E) do{ if (E == 0) { E0_DIR_WRITE( INVERT_E0_DIR); } else { E1_DIR_WRITE( INVERT_E1_DIR); } }while(0)
|
619
|
619
|
#endif
|
620
|
620
|
|
621
|
|
- #if EITHER(DUAL_X_CARRIAGE, MULTI_NOZZLE_DUPLICATION)
|
|
621
|
+ #if HAS_DUPLICATION_MODE
|
|
622
|
+
|
|
623
|
+ #if ENABLED(MULTI_NOZZLE_DUPLICATION)
|
|
624
|
+ #define _DUPE(N,T,V) do{ if (TEST(duplication_e_mask, N)) E##N##_##T##_WRITE(V); }while(0)
|
|
625
|
+ #else
|
|
626
|
+ #define _DUPE(N,T,V) E##N##_##T##_WRITE(V)
|
|
627
|
+ #endif
|
|
628
|
+
|
|
629
|
+ #define NDIR(N) _DUPE(N,DIR,!INVERT_E##N##_DIR)
|
|
630
|
+ #define RDIR(N) _DUPE(N,DIR, INVERT_E##N##_DIR)
|
622
|
631
|
|
623
|
|
- #define NDIR(N) _DUPE(DIR,!INVERT_E##N##_DIR)
|
624
|
|
- #define RDIR(N) _DUPE(DIR, INVERT_E##N##_DIR)
|
625
|
632
|
#define E_STEP_WRITE(E,V) do{ if (extruder_duplication_enabled) { DUPE(STEP,V); } else _E_STEP_WRITE(E,V); }while(0)
|
626
|
633
|
|
627
|
634
|
#if E_STEPPERS > 2
|
628
|
|
- #define _DUPE(N,T,V) do{ if (duplication_e_mask <= (N)) E##N##_##T##_WRITE(V); }while(0)
|
629
|
635
|
#if E_STEPPERS > 5
|
630
|
636
|
#define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); _DUPE(3,T,V); _DUPE(4,T,V); _DUPE(5,T,V); }while(0)
|
631
|
637
|
#define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); NDIR(3); NDIR(4); NDIR(5); } else _NORM_E_DIR(E); }while(0)
|
|
@@ -644,8 +650,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
644
|
650
|
#define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); } else _REV_E_DIR(E); }while(0)
|
645
|
651
|
#endif
|
646
|
652
|
#else
|
647
|
|
- #define _DUPE(T,V) do{ E0_##T##_WRITE(V); E1_##T##_WRITE(V); }while(0)
|
648
|
|
- #define DUPE(T,V) _DUPE(T,V)
|
|
653
|
+ #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); } while(0)
|
649
|
654
|
#define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); } else _NORM_E_DIR(E); }while(0)
|
650
|
655
|
#define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); } else _REV_E_DIR(E); }while(0)
|
651
|
656
|
#endif
|