Browse Source

💥 Num Axes and Multi-Stepper based on Driver Types (#24120)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
Keith Bennett 2 years ago
parent
commit
df40181357
No account linked to committer's email address

+ 0
- 2
Marlin/Configuration.h View File

155
  * These settings allow Marlin to tune stepper driver timing and enable advanced options for
155
  * These settings allow Marlin to tune stepper driver timing and enable advanced options for
156
  * stepper drivers that support them. You may also override timing options in Configuration_adv.h.
156
  * stepper drivers that support them. You may also override timing options in Configuration_adv.h.
157
  *
157
  *
158
- * A4988 is assumed for unspecified drivers.
159
- *
160
  * Use TMC2208/TMC2208_STANDALONE for TMC2225 drivers and TMC2209/TMC2209_STANDALONE for TMC2226 drivers.
158
  * Use TMC2208/TMC2208_STANDALONE for TMC2225 drivers and TMC2209/TMC2209_STANDALONE for TMC2226 drivers.
161
  *
159
  *
162
  * Options: A4988, A5984, DRV8825, LV8729, L6470, L6474, POWERSTEP01,
160
  * Options: A4988, A5984, DRV8825, LV8729, L6470, L6474, POWERSTEP01,

+ 73
- 69
Marlin/Configuration_adv.h View File

714
 #endif
714
 #endif
715
 
715
 
716
 /**
716
 /**
717
- * Dual Steppers / Dual Endstops
718
- *
719
- * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
720
- *
721
- * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
722
- * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
723
- * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
724
- * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
725
- *
726
- * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
727
- * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
728
- * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
729
- */
730
-
731
-//#define X_DUAL_STEPPER_DRIVERS
732
-#if ENABLED(X_DUAL_STEPPER_DRIVERS)
733
-  //#define INVERT_X2_VS_X_DIR    // Enable if X2 direction signal is opposite to X
734
-  //#define X_DUAL_ENDSTOPS
735
-  #if ENABLED(X_DUAL_ENDSTOPS)
736
-    #define X2_USE_ENDSTOP _XMAX_
737
-    #define X2_ENDSTOP_ADJUSTMENT  0
738
-  #endif
739
-#endif
740
-
741
-//#define Y_DUAL_STEPPER_DRIVERS
742
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
743
-  //#define INVERT_Y2_VS_Y_DIR   // Enable if Y2 direction signal is opposite to Y
744
-  //#define Y_DUAL_ENDSTOPS
745
-  #if ENABLED(Y_DUAL_ENDSTOPS)
746
-    #define Y2_USE_ENDSTOP _YMAX_
747
-    #define Y2_ENDSTOP_ADJUSTMENT  0
748
-  #endif
749
-#endif
750
-
751
-//
752
-// For Z set the number of stepper drivers
753
-//
754
-#define NUM_Z_STEPPER_DRIVERS 1   // (1-4) Z options change based on how many
755
-
756
-#if NUM_Z_STEPPER_DRIVERS > 1
757
-  // Enable if Z motor direction signals are the opposite of Z1
758
-  //#define INVERT_Z2_VS_Z_DIR
759
-  //#define INVERT_Z3_VS_Z_DIR
760
-  //#define INVERT_Z4_VS_Z_DIR
761
-
762
-  //#define Z_MULTI_ENDSTOPS
763
-  #if ENABLED(Z_MULTI_ENDSTOPS)
764
-    #define Z2_USE_ENDSTOP          _XMAX_
765
-    #define Z2_ENDSTOP_ADJUSTMENT   0
766
-    #if NUM_Z_STEPPER_DRIVERS >= 3
767
-      #define Z3_USE_ENDSTOP        _YMAX_
768
-      #define Z3_ENDSTOP_ADJUSTMENT 0
769
-    #endif
770
-    #if NUM_Z_STEPPER_DRIVERS >= 4
771
-      #define Z4_USE_ENDSTOP        _ZMAX_
772
-      #define Z4_ENDSTOP_ADJUSTMENT 0
773
-    #endif
774
-  #endif
775
-#endif
776
-
777
-// Drive the E axis with two synchronized steppers
778
-//#define E_DUAL_STEPPER_DRIVERS
779
-#if ENABLED(E_DUAL_STEPPER_DRIVERS)
780
-  //#define INVERT_E1_VS_E0_DIR   // Enable if the E motors need opposite DIR states
781
-#endif
782
-
783
-/**
784
  * Dual X Carriage
717
  * Dual X Carriage
785
  *
718
  *
786
  * This setup has two X carriages that can move independently, each with its own hotend.
719
  * This setup has two X carriages that can move independently, each with its own hotend.
830
   //#define EVENT_GCODE_IDEX_AFTER_MODECHANGE "G28X"
763
   //#define EVENT_GCODE_IDEX_AFTER_MODECHANGE "G28X"
831
 #endif
764
 #endif
832
 
765
 
766
+/**
767
+ * Multi-Stepper / Multi-Endstop
768
+ *
769
+ * When X2_DRIVER_TYPE is defined, this indicates that the X and X2 motors work in tandem.
770
+ * The following explanations for X also apply to Y and Z multi-stepper setups.
771
+ * Endstop offsets may be changed by 'M666 X<offset> Y<offset> Z<offset>' and stored to EEPROM.
772
+ *
773
+ * - Enable INVERT_X2_VS_X_DIR if the X2 motor requires an opposite DIR signal from X.
774
+ *
775
+ * - Enable X_DUAL_ENDSTOPS if the second motor has its own endstop, with adjustable offset.
776
+ *
777
+ *   - Extra endstops are included in the output of 'M119'.
778
+ *
779
+ *   - Set X_DUAL_ENDSTOP_ADJUSTMENT to the known error in the X2 endstop.
780
+ *     Applied to the X2 motor on 'G28' / 'G28 X'.
781
+ *     Get the offset by homing X and measuring the error.
782
+ *     Also set with 'M666 X<offset>' and stored to EEPROM with 'M500'.
783
+ *
784
+ *   - Use X2_USE_ENDSTOP to set the endstop plug by name. (_XMIN_, _XMAX_, _YMIN_, _YMAX_, _ZMIN_, _ZMAX_)
785
+ */
786
+#if HAS_X2_STEPPER && DISABLED(DUAL_X_CARRIAGE)
787
+  //#define INVERT_X2_VS_X_DIR        // X2 direction signal is the opposite of X
788
+  //#define X_DUAL_ENDSTOPS           // X2 has its own endstop
789
+  #if ENABLED(X_DUAL_ENDSTOPS)
790
+    #define X2_USE_ENDSTOP    _XMAX_  // X2 endstop board plug. Don't forget to enable USE_*_PLUG.
791
+    #define X2_ENDSTOP_ADJUSTMENT  0  // X2 offset relative to X endstop
792
+  #endif
793
+#endif
794
+
795
+#if HAS_DUAL_Y_STEPPERS
796
+  //#define INVERT_Y2_VS_Y_DIR        // Y2 direction signal is the opposite of Y
797
+  //#define Y_DUAL_ENDSTOPS           // Y2 has its own endstop
798
+  #if ENABLED(Y_DUAL_ENDSTOPS)
799
+    #define Y2_USE_ENDSTOP    _YMAX_  // Y2 endstop board plug. Don't forget to enable USE_*_PLUG.
800
+    #define Y2_ENDSTOP_ADJUSTMENT  0  // Y2 offset relative to Y endstop
801
+  #endif
802
+#endif
803
+
804
+//
805
+// Multi-Z steppers
806
+//
807
+#ifdef Z2_DRIVER_TYPE
808
+  //#define INVERT_Z2_VS_Z_DIR        // Z2 direction signal is the opposite of Z
809
+
810
+  //#define Z_MULTI_ENDSTOPS          // Other Z axes have their own endstops
811
+  #if ENABLED(Z_MULTI_ENDSTOPS)
812
+    #define Z2_USE_ENDSTOP   _XMAX_   // Z2 endstop board plug. Don't forget to enable USE_*_PLUG.
813
+    #define Z2_ENDSTOP_ADJUSTMENT 0   // Z2 offset relative to Y endstop
814
+  #endif
815
+  #ifdef Z3_DRIVER_TYPE
816
+    //#define INVERT_Z3_VS_Z_DIR      // Z3 direction signal is the opposite of Z
817
+    #if ENABLED(Z_MULTI_ENDSTOPS)
818
+      #define Z3_USE_ENDSTOP   _YMAX_ // Z3 endstop board plug. Don't forget to enable USE_*_PLUG.
819
+      #define Z3_ENDSTOP_ADJUSTMENT 0 // Z3 offset relative to Y endstop
820
+    #endif
821
+  #endif
822
+  #ifdef Z4_DRIVER_TYPE
823
+    //#define INVERT_Z4_VS_Z_DIR      // Z4 direction signal is the opposite of Z
824
+    #if ENABLED(Z_MULTI_ENDSTOPS)
825
+      #define Z4_USE_ENDSTOP   _ZMAX_ // Z4 endstop board plug. Don't forget to enable USE_*_PLUG.
826
+      #define Z4_ENDSTOP_ADJUSTMENT 0 // Z4 offset relative to Y endstop
827
+    #endif
828
+  #endif
829
+#endif
830
+
831
+// Drive the E axis with two synchronized steppers
832
+//#define E_DUAL_STEPPER_DRIVERS
833
+#if ENABLED(E_DUAL_STEPPER_DRIVERS)
834
+  //#define INVERT_E1_VS_E0_DIR       // E direction signals are opposites
835
+#endif
836
+
833
 // Activate a solenoid on the active extruder with M380. Disable all with M381.
837
 // Activate a solenoid on the active extruder with M380. Disable all with M381.
834
 // Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
838
 // Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
835
 //#define EXT_SOLENOID
839
 //#define EXT_SOLENOID
963
 
967
 
964
   /**
968
   /**
965
    * Z Stepper positions for more rapid convergence in bed alignment.
969
    * Z Stepper positions for more rapid convergence in bed alignment.
966
-   * Requires NUM_Z_STEPPER_DRIVERS to be 3 or 4.
970
+   * Requires 3 or 4 Z steppers.
967
    *
971
    *
968
    * Define Stepper XY positions for Z1, Z2, Z3... corresponding to the screw
972
    * Define Stepper XY positions for Z1, Z2, Z3... corresponding to the screw
969
    * positions in the bed carriage, with one position per Z stepper in stepper
973
    * positions in the bed carriage, with one position per Z stepper in stepper
2460
 
2464
 
2461
   /**
2465
   /**
2462
    * Extra G-code to run while executing tool-change commands. Can be used to use an additional
2466
    * Extra G-code to run while executing tool-change commands. Can be used to use an additional
2463
-   * stepper motor (I axis, see option NUM_AXES in Configuration.h) to drive the tool-changer.
2467
+   * stepper motor (e.g., I axis in Configuration.h) to drive the tool-changer.
2464
    */
2468
    */
2465
   //#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0
2469
   //#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0
2466
   //#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10"       // Extra G-code to run while executing tool-change command T1
2470
   //#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10"       // Extra G-code to run while executing tool-change command T1

+ 5
- 5
Marlin/src/core/drivers.h View File

67
 #define AXIS_DRIVER_TYPE_V(T) _AXIS_DRIVER_TYPE(V,T)
67
 #define AXIS_DRIVER_TYPE_V(T) _AXIS_DRIVER_TYPE(V,T)
68
 #define AXIS_DRIVER_TYPE_W(T) _AXIS_DRIVER_TYPE(W,T)
68
 #define AXIS_DRIVER_TYPE_W(T) _AXIS_DRIVER_TYPE(W,T)
69
 
69
 
70
-#define AXIS_DRIVER_TYPE_X2(T) (EITHER(X_DUAL_STEPPER_DRIVERS, DUAL_X_CARRIAGE) && _AXIS_DRIVER_TYPE(X2,T))
71
-#define AXIS_DRIVER_TYPE_Y2(T) (ENABLED(Y_DUAL_STEPPER_DRIVERS) && _AXIS_DRIVER_TYPE(Y2,T))
72
-#define AXIS_DRIVER_TYPE_Z2(T) (NUM_Z_STEPPER_DRIVERS >= 2 && _AXIS_DRIVER_TYPE(Z2,T))
73
-#define AXIS_DRIVER_TYPE_Z3(T) (NUM_Z_STEPPER_DRIVERS >= 3 && _AXIS_DRIVER_TYPE(Z3,T))
74
-#define AXIS_DRIVER_TYPE_Z4(T) (NUM_Z_STEPPER_DRIVERS >= 4 && _AXIS_DRIVER_TYPE(Z4,T))
70
+#define AXIS_DRIVER_TYPE_X2(T) (HAS_X2_STEPPER && _AXIS_DRIVER_TYPE(X2,T))
71
+#define AXIS_DRIVER_TYPE_Y2(T) (HAS_DUAL_Y_STEPPERS && _AXIS_DRIVER_TYPE(Y2,T))
72
+#define AXIS_DRIVER_TYPE_Z2(T) (NUM_Z_STEPPERS >= 2 && _AXIS_DRIVER_TYPE(Z2,T))
73
+#define AXIS_DRIVER_TYPE_Z3(T) (NUM_Z_STEPPERS >= 3 && _AXIS_DRIVER_TYPE(Z3,T))
74
+#define AXIS_DRIVER_TYPE_Z4(T) (NUM_Z_STEPPERS >= 4 && _AXIS_DRIVER_TYPE(Z4,T))
75
 
75
 
76
 #define AXIS_DRIVER_TYPE_E(N,T) (E_STEPPERS > N && _AXIS_DRIVER_TYPE(E##N,T))
76
 #define AXIS_DRIVER_TYPE_E(N,T) (E_STEPPERS > N && _AXIS_DRIVER_TYPE(E##N,T))
77
 #define AXIS_DRIVER_TYPE_E0(T) AXIS_DRIVER_TYPE_E(0,T)
77
 #define AXIS_DRIVER_TYPE_E0(T) AXIS_DRIVER_TYPE_E(0,T)

+ 11
- 11
Marlin/src/feature/z_stepper_align.cpp View File

33
 
33
 
34
 ZStepperAlign z_stepper_align;
34
 ZStepperAlign z_stepper_align;
35
 
35
 
36
-xy_pos_t ZStepperAlign::xy[NUM_Z_STEPPER_DRIVERS];
36
+xy_pos_t ZStepperAlign::xy[NUM_Z_STEPPERS];
37
 
37
 
38
 #if HAS_Z_STEPPER_ALIGN_STEPPER_XY
38
 #if HAS_Z_STEPPER_ALIGN_STEPPER_XY
39
-  xy_pos_t ZStepperAlign::stepper_xy[NUM_Z_STEPPER_DRIVERS];
39
+  xy_pos_t ZStepperAlign::stepper_xy[NUM_Z_STEPPERS];
40
 #endif
40
 #endif
41
 
41
 
42
 void ZStepperAlign::reset_to_default() {
42
 void ZStepperAlign::reset_to_default() {
43
   #ifdef Z_STEPPER_ALIGN_XY
43
   #ifdef Z_STEPPER_ALIGN_XY
44
 
44
 
45
     constexpr xy_pos_t xy_init[] = Z_STEPPER_ALIGN_XY;
45
     constexpr xy_pos_t xy_init[] = Z_STEPPER_ALIGN_XY;
46
-    static_assert(COUNT(xy_init) == NUM_Z_STEPPER_DRIVERS,
46
+    static_assert(COUNT(xy_init) == NUM_Z_STEPPERS,
47
       "Z_STEPPER_ALIGN_XY requires "
47
       "Z_STEPPER_ALIGN_XY requires "
48
-      #if NUM_Z_STEPPER_DRIVERS == 4
48
+      #if NUM_Z_STEPPERS == 4
49
         "four {X,Y} entries (Z, Z2, Z3, and Z4)."
49
         "four {X,Y} entries (Z, Z2, Z3, and Z4)."
50
-      #elif NUM_Z_STEPPER_DRIVERS == 3
50
+      #elif NUM_Z_STEPPERS == 3
51
         "three {X,Y} entries (Z, Z2, and Z3)."
51
         "three {X,Y} entries (Z, Z2, and Z3)."
52
       #else
52
       #else
53
         "two {X,Y} entries (Z and Z2)."
53
         "two {X,Y} entries (Z and Z2)."
54
       #endif
54
       #endif
55
     );
55
     );
56
 
56
 
57
-    #define VALIDATE_ALIGN_POINT(N) static_assert(N >= NUM_Z_STEPPER_DRIVERS || Probe::build_time::can_reach(xy_init[N]), \
57
+    #define VALIDATE_ALIGN_POINT(N) static_assert(N >= NUM_Z_STEPPERS || Probe::build_time::can_reach(xy_init[N]), \
58
       "Z_STEPPER_ALIGN_XY point " STRINGIFY(N) " is not reachable with the default NOZZLE_TO_PROBE offset and PROBING_MARGIN.")
58
       "Z_STEPPER_ALIGN_XY point " STRINGIFY(N) " is not reachable with the default NOZZLE_TO_PROBE offset and PROBING_MARGIN.")
59
     VALIDATE_ALIGN_POINT(0); VALIDATE_ALIGN_POINT(1); VALIDATE_ALIGN_POINT(2); VALIDATE_ALIGN_POINT(3);
59
     VALIDATE_ALIGN_POINT(0); VALIDATE_ALIGN_POINT(1); VALIDATE_ALIGN_POINT(2); VALIDATE_ALIGN_POINT(3);
60
 
60
 
61
   #else // !Z_STEPPER_ALIGN_XY
61
   #else // !Z_STEPPER_ALIGN_XY
62
 
62
 
63
     const xy_pos_t xy_init[] = {
63
     const xy_pos_t xy_init[] = {
64
-      #if NUM_Z_STEPPER_DRIVERS >= 3  // First probe point...
64
+      #if NUM_Z_STEPPERS >= 3  // First probe point...
65
         #if !Z_STEPPERS_ORIENTATION
65
         #if !Z_STEPPERS_ORIENTATION
66
           { probe.min_x(), probe.min_y() }, // SW
66
           { probe.min_x(), probe.min_y() }, // SW
67
         #elif Z_STEPPERS_ORIENTATION == 1
67
         #elif Z_STEPPERS_ORIENTATION == 1
73
         #else
73
         #else
74
           #error "Z_STEPPERS_ORIENTATION must be from 0 to 3 (first point SW, NW, NE, SE)."
74
           #error "Z_STEPPERS_ORIENTATION must be from 0 to 3 (first point SW, NW, NE, SE)."
75
         #endif
75
         #endif
76
-        #if NUM_Z_STEPPER_DRIVERS == 4    // 3 more points...
76
+        #if NUM_Z_STEPPERS == 4    // 3 more points...
77
           #if !Z_STEPPERS_ORIENTATION
77
           #if !Z_STEPPERS_ORIENTATION
78
             { probe.min_x(), probe.max_y() }, { probe.max_x(), probe.max_y() }, { probe.max_x(), probe.min_y() }  // SW
78
             { probe.min_x(), probe.max_y() }, { probe.max_x(), probe.max_y() }, { probe.max_x(), probe.min_y() }  // SW
79
           #elif Z_STEPPERS_ORIENTATION == 1
79
           #elif Z_STEPPERS_ORIENTATION == 1
106
   #if HAS_Z_STEPPER_ALIGN_STEPPER_XY
106
   #if HAS_Z_STEPPER_ALIGN_STEPPER_XY
107
     constexpr xy_pos_t stepper_xy_init[] = Z_STEPPER_ALIGN_STEPPER_XY;
107
     constexpr xy_pos_t stepper_xy_init[] = Z_STEPPER_ALIGN_STEPPER_XY;
108
     static_assert(
108
     static_assert(
109
-      COUNT(stepper_xy_init) == NUM_Z_STEPPER_DRIVERS,
109
+      COUNT(stepper_xy_init) == NUM_Z_STEPPERS,
110
       "Z_STEPPER_ALIGN_STEPPER_XY requires "
110
       "Z_STEPPER_ALIGN_STEPPER_XY requires "
111
-      #if NUM_Z_STEPPER_DRIVERS == 4
111
+      #if NUM_Z_STEPPERS == 4
112
         "four {X,Y} entries (Z, Z2, Z3, and Z4)."
112
         "four {X,Y} entries (Z, Z2, Z3, and Z4)."
113
-      #elif NUM_Z_STEPPER_DRIVERS == 3
113
+      #elif NUM_Z_STEPPERS == 3
114
         "three {X,Y} entries (Z, Z2, and Z3)."
114
         "three {X,Y} entries (Z, Z2, and Z3)."
115
       #endif
115
       #endif
116
     );
116
     );

+ 2
- 2
Marlin/src/feature/z_stepper_align.h View File

29
 
29
 
30
 class ZStepperAlign {
30
 class ZStepperAlign {
31
   public:
31
   public:
32
-    static xy_pos_t xy[NUM_Z_STEPPER_DRIVERS];
32
+    static xy_pos_t xy[NUM_Z_STEPPERS];
33
 
33
 
34
     #if HAS_Z_STEPPER_ALIGN_STEPPER_XY
34
     #if HAS_Z_STEPPER_ALIGN_STEPPER_XY
35
-      static xy_pos_t stepper_xy[NUM_Z_STEPPER_DRIVERS];
35
+      static xy_pos_t stepper_xy[NUM_Z_STEPPERS];
36
     #endif
36
     #endif
37
 
37
 
38
   static void reset_to_default();
38
   static void reset_to_default();

+ 1
- 1
Marlin/src/gcode/calibrate/G34.cpp View File

91
     digipot_i2c.set_current(Z_AXIS, target_current)
91
     digipot_i2c.set_current(Z_AXIS, target_current)
92
   #elif HAS_TRINAMIC_CONFIG
92
   #elif HAS_TRINAMIC_CONFIG
93
     const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT);
93
     const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT);
94
-    static uint16_t previous_current_arr[NUM_Z_STEPPER_DRIVERS];
94
+    static uint16_t previous_current_arr[NUM_Z_STEPPERS];
95
     #if AXIS_IS_TMC(Z)
95
     #if AXIS_IS_TMC(Z)
96
       previous_current_arr[0] = stepperZ.getMilliamps();
96
       previous_current_arr[0] = stepperZ.getMilliamps();
97
       stepperZ.rms_current(target_current);
97
       stepperZ.rms_current(target_current);

+ 18
- 18
Marlin/src/gcode/calibrate/G34_M422.cpp View File

52
 #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
52
 #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
53
 #include "../../core/debug_out.h"
53
 #include "../../core/debug_out.h"
54
 
54
 
55
-#if NUM_Z_STEPPER_DRIVERS >= 3
55
+#if NUM_Z_STEPPERS >= 3
56
   #define TRIPLE_Z 1
56
   #define TRIPLE_Z 1
57
-  #if NUM_Z_STEPPER_DRIVERS >= 4
57
+  #if NUM_Z_STEPPERS >= 4
58
     #define QUAD_Z 1
58
     #define QUAD_Z 1
59
   #endif
59
   #endif
60
 #endif
60
 #endif
180
       // This hack is un-done at the end of G34 - either by re-homing, or by using the probed heights of the last iteration.
180
       // This hack is un-done at the end of G34 - either by re-homing, or by using the probed heights of the last iteration.
181
 
181
 
182
       #if !HAS_Z_STEPPER_ALIGN_STEPPER_XY
182
       #if !HAS_Z_STEPPER_ALIGN_STEPPER_XY
183
-        float last_z_align_move[NUM_Z_STEPPER_DRIVERS] = ARRAY_N_1(NUM_Z_STEPPER_DRIVERS, 10000.0f);
183
+        float last_z_align_move[NUM_Z_STEPPERS] = ARRAY_N_1(NUM_Z_STEPPERS, 10000.0f);
184
       #else
184
       #else
185
         float last_z_align_level_indicator = 10000.0f;
185
         float last_z_align_level_indicator = 10000.0f;
186
       #endif
186
       #endif
187
-      float z_measured[NUM_Z_STEPPER_DRIVERS] = { 0 },
187
+      float z_measured[NUM_Z_STEPPERS] = { 0 },
188
             z_maxdiff = 0.0f,
188
             z_maxdiff = 0.0f,
189
             amplification = z_auto_align_amplification;
189
             amplification = z_auto_align_amplification;
190
 
190
 
217
         float z_measured_max = -100000.0f;
217
         float z_measured_max = -100000.0f;
218
 
218
 
219
         // Probe all positions (one per Z-Stepper)
219
         // Probe all positions (one per Z-Stepper)
220
-        LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
220
+        LOOP_L_N(i, NUM_Z_STEPPERS) {
221
           // iteration odd/even --> downward / upward stepper sequence
221
           // iteration odd/even --> downward / upward stepper sequence
222
-          const uint8_t iprobe = (iteration & 1) ? NUM_Z_STEPPER_DRIVERS - 1 - i : i;
222
+          const uint8_t iprobe = (iteration & 1) ? NUM_Z_STEPPERS - 1 - i : i;
223
 
223
 
224
           // Safe clearance even on an incline
224
           // Safe clearance even on an incline
225
           if ((iteration == 0 || i > 0) && z_probe > current_position.z) do_blocking_move_to_z(z_probe);
225
           if ((iteration == 0 || i > 0) && z_probe > current_position.z) do_blocking_move_to_z(z_probe);
270
           // This allows the actual adjustment logic to be shared by both algorithms.
270
           // This allows the actual adjustment logic to be shared by both algorithms.
271
           linear_fit_data lfd;
271
           linear_fit_data lfd;
272
           incremental_LSF_reset(&lfd);
272
           incremental_LSF_reset(&lfd);
273
-          LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
273
+          LOOP_L_N(i, NUM_Z_STEPPERS) {
274
             SERIAL_ECHOLNPGM("PROBEPT_", i, ": ", z_measured[i]);
274
             SERIAL_ECHOLNPGM("PROBEPT_", i, ": ", z_measured[i]);
275
             incremental_LSF(&lfd, z_stepper_align.xy[i], z_measured[i]);
275
             incremental_LSF(&lfd, z_stepper_align.xy[i], z_measured[i]);
276
           }
276
           }
277
           finish_incremental_LSF(&lfd);
277
           finish_incremental_LSF(&lfd);
278
 
278
 
279
           z_measured_min = 100000.0f;
279
           z_measured_min = 100000.0f;
280
-          LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
280
+          LOOP_L_N(i, NUM_Z_STEPPERS) {
281
             z_measured[i] = -(lfd.A * z_stepper_align.stepper_xy[i].x + lfd.B * z_stepper_align.stepper_xy[i].y + lfd.D);
281
             z_measured[i] = -(lfd.A * z_stepper_align.stepper_xy[i].x + lfd.B * z_stepper_align.stepper_xy[i].y + lfd.D);
282
             z_measured_min = _MIN(z_measured_min, z_measured[i]);
282
             z_measured_min = _MIN(z_measured_min, z_measured[i]);
283
           }
283
           }
284
 
284
 
285
           SERIAL_ECHOLNPGM(
285
           SERIAL_ECHOLNPGM(
286
-            LIST_N(DOUBLE(NUM_Z_STEPPER_DRIVERS),
286
+            LIST_N(DOUBLE(NUM_Z_STEPPERS),
287
               "Calculated Z1=", z_measured[0],
287
               "Calculated Z1=", z_measured[0],
288
                         " Z2=", z_measured[1],
288
                         " Z2=", z_measured[1],
289
                         " Z3=", z_measured[2],
289
                         " Z3=", z_measured[2],
307
 
307
 
308
         #if HAS_STATUS_MESSAGE
308
         #if HAS_STATUS_MESSAGE
309
           char fstr1[10];
309
           char fstr1[10];
310
-          char msg[6 + (6 + 5) * NUM_Z_STEPPER_DRIVERS + 1]
310
+          char msg[6 + (6 + 5) * NUM_Z_STEPPERS + 1]
311
             #if TRIPLE_Z
311
             #if TRIPLE_Z
312
               , fstr2[10], fstr3[10]
312
               , fstr2[10], fstr3[10]
313
               #if QUAD_Z
313
               #if QUAD_Z
345
 
345
 
346
           // Calculate mean value as a reference
346
           // Calculate mean value as a reference
347
           float z_measured_mean = 0.0f;
347
           float z_measured_mean = 0.0f;
348
-          LOOP_L_N(zstepper, NUM_Z_STEPPER_DRIVERS) z_measured_mean += z_measured[zstepper];
349
-          z_measured_mean /= NUM_Z_STEPPER_DRIVERS;
348
+          LOOP_L_N(zstepper, NUM_Z_STEPPERS) z_measured_mean += z_measured[zstepper];
349
+          z_measured_mean /= NUM_Z_STEPPERS;
350
 
350
 
351
           // Calculate the sum of the absolute deviations from the mean value
351
           // Calculate the sum of the absolute deviations from the mean value
352
           float z_align_level_indicator = 0.0f;
352
           float z_align_level_indicator = 0.0f;
353
-          LOOP_L_N(zstepper, NUM_Z_STEPPER_DRIVERS)
353
+          LOOP_L_N(zstepper, NUM_Z_STEPPERS)
354
             z_align_level_indicator += ABS(z_measured[zstepper] - z_measured_mean);
354
             z_align_level_indicator += ABS(z_measured[zstepper] - z_measured_mean);
355
 
355
 
356
           // If it's getting worse, stop and throw an error
356
           // If it's getting worse, stop and throw an error
365
 
365
 
366
         bool success_break = true;
366
         bool success_break = true;
367
         // Correct the individual stepper offsets
367
         // Correct the individual stepper offsets
368
-        LOOP_L_N(zstepper, NUM_Z_STEPPER_DRIVERS) {
368
+        LOOP_L_N(zstepper, NUM_Z_STEPPERS) {
369
           // Calculate current stepper move
369
           // Calculate current stepper move
370
           float z_align_move = z_measured[zstepper] - z_measured_min;
370
           float z_align_move = z_measured[zstepper] - z_measured_min;
371
           const float z_align_abs = ABS(z_align_move);
371
           const float z_align_abs = ABS(z_align_move);
515
     #endif
515
     #endif
516
   }
516
   }
517
 
517
 
518
-  if (!WITHIN(position_index, 1, NUM_Z_STEPPER_DRIVERS)) {
518
+  if (!WITHIN(position_index, 1, NUM_Z_STEPPERS)) {
519
     SERIAL_ECHOF(err_string);
519
     SERIAL_ECHOF(err_string);
520
-    SERIAL_ECHOLNPGM(" index invalid (1.." STRINGIFY(NUM_Z_STEPPER_DRIVERS) ").");
520
+    SERIAL_ECHOLNPGM(" index invalid (1.." STRINGIFY(NUM_Z_STEPPERS) ").");
521
     return;
521
     return;
522
   }
522
   }
523
 
523
 
544
 
544
 
545
 void GcodeSuite::M422_report(const bool forReplay/*=true*/) {
545
 void GcodeSuite::M422_report(const bool forReplay/*=true*/) {
546
   report_heading(forReplay, F(STR_Z_AUTO_ALIGN));
546
   report_heading(forReplay, F(STR_Z_AUTO_ALIGN));
547
-  LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
547
+  LOOP_L_N(i, NUM_Z_STEPPERS) {
548
     report_echo_start(forReplay);
548
     report_echo_start(forReplay);
549
     SERIAL_ECHOLNPGM_P(
549
     SERIAL_ECHOLNPGM_P(
550
       PSTR("  M422 S"), i + 1,
550
       PSTR("  M422 S"), i + 1,
553
     );
553
     );
554
   }
554
   }
555
   #if HAS_Z_STEPPER_ALIGN_STEPPER_XY
555
   #if HAS_Z_STEPPER_ALIGN_STEPPER_XY
556
-    LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
556
+    LOOP_L_N(i, NUM_Z_STEPPERS) {
557
       report_echo_start(forReplay);
557
       report_echo_start(forReplay);
558
       SERIAL_ECHOLNPGM_P(
558
       SERIAL_ECHOLNPGM_P(
559
         PSTR("  M422 W"), i + 1,
559
         PSTR("  M422 W"), i + 1,

+ 4
- 4
Marlin/src/gcode/calibrate/M666.cpp View File

93
     #if ENABLED(Z_MULTI_ENDSTOPS)
93
     #if ENABLED(Z_MULTI_ENDSTOPS)
94
       if (parser.seenval('Z')) {
94
       if (parser.seenval('Z')) {
95
         const float z_adj = parser.value_linear_units();
95
         const float z_adj = parser.value_linear_units();
96
-        #if NUM_Z_STEPPER_DRIVERS == 2
96
+        #if NUM_Z_STEPPERS == 2
97
           endstops.z2_endstop_adj = z_adj;
97
           endstops.z2_endstop_adj = z_adj;
98
         #else
98
         #else
99
           const int ind = parser.intval('S');
99
           const int ind = parser.intval('S');
100
           #define _SET_ZADJ(N) if (!ind || ind == N) endstops.z##N##_endstop_adj = z_adj;
100
           #define _SET_ZADJ(N) if (!ind || ind == N) endstops.z##N##_endstop_adj = z_adj;
101
-          REPEAT_S(2, INCREMENT(NUM_Z_STEPPER_DRIVERS), _SET_ZADJ)
101
+          REPEAT_S(2, INCREMENT(NUM_Z_STEPPERS), _SET_ZADJ)
102
         #endif
102
         #endif
103
       }
103
       }
104
     #endif
104
     #endif
114
       SERIAL_ECHOLNPGM_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj));
114
       SERIAL_ECHOLNPGM_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj));
115
     #endif
115
     #endif
116
     #if ENABLED(Z_MULTI_ENDSTOPS)
116
     #if ENABLED(Z_MULTI_ENDSTOPS)
117
-      #if NUM_Z_STEPPER_DRIVERS >= 3
117
+      #if NUM_Z_STEPPERS >= 3
118
         SERIAL_ECHOPGM(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
118
         SERIAL_ECHOPGM(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
119
         report_echo_start(forReplay);
119
         report_echo_start(forReplay);
120
         SERIAL_ECHOPGM("  M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
120
         SERIAL_ECHOPGM("  M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
121
-        #if NUM_Z_STEPPER_DRIVERS >= 4
121
+        #if NUM_Z_STEPPERS >= 4
122
           report_echo_start(forReplay);
122
           report_echo_start(forReplay);
123
           SERIAL_ECHOPGM("  M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj));
123
           SERIAL_ECHOPGM("  M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj));
124
         #endif
124
         #endif

+ 1
- 1
Marlin/src/gcode/feature/pause/M600.cpp View File

34
   #include "../../../module/tool_change.h"
34
   #include "../../../module/tool_change.h"
35
 #endif
35
 #endif
36
 
36
 
37
-#if ENABLED(HAS_PRUSA_MMU2)
37
+#if HAS_PRUSA_MMU2
38
   #include "../../../feature/mmu/mmu2.h"
38
   #include "../../../feature/mmu/mmu2.h"
39
   #if ENABLED(MMU2_MENUS)
39
   #if ENABLED(MMU2_MENUS)
40
     #include "../../../lcd/menu/menu_mmu2.h"
40
     #include "../../../lcd/menu/menu_mmu2.h"

+ 18
- 0
Marlin/src/inc/Conditionals_LCD.h View File

707
   #define HAS_Y_AXIS 1
707
   #define HAS_Y_AXIS 1
708
   #if NUM_AXES >= XYZ
708
   #if NUM_AXES >= XYZ
709
     #define HAS_Z_AXIS 1
709
     #define HAS_Z_AXIS 1
710
+    #ifdef Z4_DRIVER_TYPE
711
+      #define NUM_Z_STEPPERS 4
712
+    #elif defined(Z3_DRIVER_TYPE)
713
+      #define NUM_Z_STEPPERS 3
714
+    #elif defined(Z2_DRIVER_TYPE)
715
+      #define NUM_Z_STEPPERS 2
716
+    #else
717
+      #define NUM_Z_STEPPERS 1
718
+    #endif
710
     #if NUM_AXES >= 4
719
     #if NUM_AXES >= 4
711
       #define HAS_I_AXIS 1
720
       #define HAS_I_AXIS 1
712
       #if NUM_AXES >= 5
721
       #if NUM_AXES >= 5
869
   #undef MANUAL_W_HOME_POS
878
   #undef MANUAL_W_HOME_POS
870
 #endif
879
 #endif
871
 
880
 
881
+#ifdef X2_DRIVER_TYPE
882
+  #define HAS_X2_STEPPER 1
883
+  // Dual X Carriage isn't known yet. TODO: Consider moving it to Configuration.h.
884
+#endif
885
+#ifdef Y2_DRIVER_TYPE
886
+  #define HAS_Y2_STEPPER 1
887
+  #define HAS_DUAL_Y_STEPPERS 1
888
+#endif
889
+
872
 /**
890
 /**
873
  * Number of Primary Linear Axes (e.g., XYZ)
891
  * Number of Primary Linear Axes (e.g., XYZ)
874
  * X, XY, or XYZ axes. Excluding duplicate axes (X2, Y2. Z2. Z3, Z4)
892
  * X, XY, or XYZ axes. Excluding duplicate axes (X2, Y2. Z2. Z3, Z4)

+ 8
- 21
Marlin/src/inc/Conditionals_adv.h View File

650
 #endif
650
 #endif
651
 
651
 
652
 // Multiple Z steppers
652
 // Multiple Z steppers
653
-#ifndef NUM_Z_STEPPER_DRIVERS
654
-  #define NUM_Z_STEPPER_DRIVERS 1
655
-#endif
656
-
657
-// Fallback Stepper Driver types that depend on Configuration_adv.h
658
-#if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS)
659
-  #define HAS_X2_STEPPER 1
660
-#else
661
-  #undef X2_DRIVER_TYPE
662
-#endif
663
-#if DISABLED(Y_DUAL_STEPPER_DRIVERS)
664
-  #undef Y2_DRIVER_TYPE
665
-#endif
666
-
667
-#if NUM_Z_STEPPER_DRIVERS < 4
668
-  #undef Z4_DRIVER_TYPE
653
+#if NUM_Z_STEPPERS < 4
669
   #undef INVERT_Z4_VS_Z_DIR
654
   #undef INVERT_Z4_VS_Z_DIR
670
-  #if NUM_Z_STEPPER_DRIVERS < 3
671
-    #undef Z3_DRIVER_TYPE
655
+  #if NUM_Z_STEPPERS < 3
672
     #undef INVERT_Z3_VS_Z_DIR
656
     #undef INVERT_Z3_VS_Z_DIR
673
-    #if NUM_Z_STEPPER_DRIVERS < 2
674
-      #undef Z2_DRIVER_TYPE
657
+    #if NUM_Z_STEPPERS < 2
675
       #undef INVERT_Z2_VS_Z_DIR
658
       #undef INVERT_Z2_VS_Z_DIR
676
     #endif
659
     #endif
677
   #endif
660
   #endif
678
 #endif
661
 #endif
679
 
662
 
663
+#if defined(X2_DRIVER_TYPE) && DISABLED(DUAL_X_CARRIAGE)
664
+  #define HAS_DUAL_X_STEPPERS 1
665
+#endif
666
+
680
 //
667
 //
681
 // Spindle/Laser power display types
668
 // Spindle/Laser power display types
682
 // Defined here so sanity checks can use them
669
 // Defined here so sanity checks can use them
956
               #undef HOME_Z_FIRST
943
               #undef HOME_Z_FIRST
957
               #undef HOMING_Z_WITH_PROBE
944
               #undef HOMING_Z_WITH_PROBE
958
               #undef ENABLE_LEVELING_FADE_HEIGHT
945
               #undef ENABLE_LEVELING_FADE_HEIGHT
959
-              #undef NUM_Z_STEPPER_DRIVERS
946
+              #undef NUM_Z_STEPPERS
960
               #undef CNC_WORKSPACE_PLANES
947
               #undef CNC_WORKSPACE_PLANES
961
               #if NUM_AXES < 2
948
               #if NUM_AXES < 2
962
                 #undef STEALTHCHOP_Y
949
                 #undef STEALTHCHOP_Y

+ 11
- 11
Marlin/src/inc/Conditionals_post.h View File

1234
     #endif
1234
     #endif
1235
   #endif
1235
   #endif
1236
 
1236
 
1237
-  #if NUM_Z_STEPPER_DRIVERS >= 3
1237
+  #if NUM_Z_STEPPERS >= 3
1238
     #if Z_HOME_TO_MAX
1238
     #if Z_HOME_TO_MAX
1239
       #ifndef Z3_MAX_ENDSTOP_INVERTING
1239
       #ifndef Z3_MAX_ENDSTOP_INVERTING
1240
         #if Z3_USE_ENDSTOP == _XMIN_
1240
         #if Z3_USE_ENDSTOP == _XMIN_
1366
     #endif
1366
     #endif
1367
   #endif
1367
   #endif
1368
 
1368
 
1369
-  #if NUM_Z_STEPPER_DRIVERS >= 4
1369
+  #if NUM_Z_STEPPERS >= 4
1370
     #if Z_HOME_TO_MAX
1370
     #if Z_HOME_TO_MAX
1371
       #ifndef Z4_MAX_ENDSTOP_INVERTING
1371
       #ifndef Z4_MAX_ENDSTOP_INVERTING
1372
         #if Z4_USE_ENDSTOP == _XMIN_
1372
         #if Z4_USE_ENDSTOP == _XMIN_
1675
   #undef DISABLE_INACTIVE_Z
1675
   #undef DISABLE_INACTIVE_Z
1676
 #endif
1676
 #endif
1677
 
1677
 
1678
-#if NUM_Z_STEPPER_DRIVERS >= 2
1678
+#if NUM_Z_STEPPERS >= 2
1679
   #if PIN_EXISTS(Z2_ENABLE) || AXIS_IS_L64XX(Z2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))
1679
   #if PIN_EXISTS(Z2_ENABLE) || AXIS_IS_L64XX(Z2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))
1680
     #define HAS_Z2_ENABLE 1
1680
     #define HAS_Z2_ENABLE 1
1681
   #endif
1681
   #endif
1690
   #endif
1690
   #endif
1691
 #endif
1691
 #endif
1692
 
1692
 
1693
-#if NUM_Z_STEPPER_DRIVERS >= 3
1693
+#if NUM_Z_STEPPERS >= 3
1694
   #if PIN_EXISTS(Z3_ENABLE) || AXIS_IS_L64XX(Z3) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))
1694
   #if PIN_EXISTS(Z3_ENABLE) || AXIS_IS_L64XX(Z3) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))
1695
     #define HAS_Z3_ENABLE 1
1695
     #define HAS_Z3_ENABLE 1
1696
   #endif
1696
   #endif
1705
   #endif
1705
   #endif
1706
 #endif
1706
 #endif
1707
 
1707
 
1708
-#if NUM_Z_STEPPER_DRIVERS >= 4
1708
+#if NUM_Z_STEPPERS >= 4
1709
   #if PIN_EXISTS(Z4_ENABLE) || AXIS_IS_L64XX(Z4) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))
1709
   #if PIN_EXISTS(Z4_ENABLE) || AXIS_IS_L64XX(Z4) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))
1710
     #define HAS_Z4_ENABLE 1
1710
     #define HAS_Z4_ENABLE 1
1711
   #endif
1711
   #endif
2080
     #ifndef Y_SLAVE_ADDRESS
2080
     #ifndef Y_SLAVE_ADDRESS
2081
       #define Y_SLAVE_ADDRESS 0
2081
       #define Y_SLAVE_ADDRESS 0
2082
     #endif
2082
     #endif
2083
-    #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
2083
+    #if HAS_DUAL_Y_STEPPERS
2084
       #if defined(Y2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Y2)
2084
       #if defined(Y2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Y2)
2085
         #define Y2_SENSORLESS 1
2085
         #define Y2_SENSORLESS 1
2086
       #endif
2086
       #endif
2127
     #ifndef Z_SLAVE_ADDRESS
2127
     #ifndef Z_SLAVE_ADDRESS
2128
       #define Z_SLAVE_ADDRESS 0
2128
       #define Z_SLAVE_ADDRESS 0
2129
     #endif
2129
     #endif
2130
-    #if NUM_Z_STEPPER_DRIVERS >= 2
2130
+    #if NUM_Z_STEPPERS >= 2
2131
       #if defined(Z2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z2)
2131
       #if defined(Z2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z2)
2132
         #define Z2_SENSORLESS 1
2132
         #define Z2_SENSORLESS 1
2133
       #endif
2133
       #endif
2144
         #define Z2_SLAVE_ADDRESS 0
2144
         #define Z2_SLAVE_ADDRESS 0
2145
       #endif
2145
       #endif
2146
     #endif
2146
     #endif
2147
-    #if NUM_Z_STEPPER_DRIVERS >= 3
2147
+    #if NUM_Z_STEPPERS >= 3
2148
       #if defined(Z3_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z3)
2148
       #if defined(Z3_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z3)
2149
         #define Z3_SENSORLESS 1
2149
         #define Z3_SENSORLESS 1
2150
       #endif
2150
       #endif
2161
         #define Z3_SLAVE_ADDRESS 0
2161
         #define Z3_SLAVE_ADDRESS 0
2162
       #endif
2162
       #endif
2163
     #endif
2163
     #endif
2164
-    #if NUM_Z_STEPPER_DRIVERS >= 4
2164
+    #if NUM_Z_STEPPERS >= 4
2165
       #if defined(Z4_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z4)
2165
       #if defined(Z4_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z4)
2166
         #define Z4_SENSORLESS 1
2166
         #define Z4_SENSORLESS 1
2167
       #endif
2167
       #endif
2542
 #define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_)
2542
 #define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_)
2543
 #define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_)
2543
 #define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_)
2544
 #define IS_Z2_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_)
2544
 #define IS_Z2_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_)
2545
-#define IS_Z3_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 && Z3_USE_ENDSTOP == _##A##M##_)
2546
-#define IS_Z4_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 && Z4_USE_ENDSTOP == _##A##M##_)
2545
+#define IS_Z3_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 3 && Z3_USE_ENDSTOP == _##A##M##_)
2546
+#define IS_Z4_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 4 && Z4_USE_ENDSTOP == _##A##M##_)
2547
 
2547
 
2548
 #define _HAS_STOP(A,M) (PIN_EXISTS(A##_##M) && !IS_PROBE_PIN(A,M) && !IS_X2_ENDSTOP(A,M) && !IS_Y2_ENDSTOP(A,M) && !IS_Z2_ENDSTOP(A,M) && !IS_Z3_ENDSTOP(A,M) && !IS_Z4_ENDSTOP(A,M))
2548
 #define _HAS_STOP(A,M) (PIN_EXISTS(A##_##M) && !IS_PROBE_PIN(A,M) && !IS_X2_ENDSTOP(A,M) && !IS_Y2_ENDSTOP(A,M) && !IS_Z2_ENDSTOP(A,M) && !IS_Z3_ENDSTOP(A,M) && !IS_Z4_ENDSTOP(A,M))
2549
 #if _HAS_STOP(X,MIN)
2549
 #if _HAS_STOP(X,MIN)

+ 27
- 27
Marlin/src/inc/SanityCheck.h View File

524
 #elif defined(Z_QUAD_ENDSTOPS_ADJUSTMENT2) || defined(Z_QUAD_ENDSTOPS_ADJUSTMENT3) || defined(Z_QUAD_ENDSTOPS_ADJUSTMENT4)
524
 #elif defined(Z_QUAD_ENDSTOPS_ADJUSTMENT2) || defined(Z_QUAD_ENDSTOPS_ADJUSTMENT3) || defined(Z_QUAD_ENDSTOPS_ADJUSTMENT4)
525
   #error "Z_QUAD_ENDSTOPS_ADJUSTMENT[234] is now Z[234]_ENDSTOP_ADJUSTMENT."
525
   #error "Z_QUAD_ENDSTOPS_ADJUSTMENT[234] is now Z[234]_ENDSTOP_ADJUSTMENT."
526
 #elif defined(Z_DUAL_STEPPER_DRIVERS)
526
 #elif defined(Z_DUAL_STEPPER_DRIVERS)
527
-  #error "Z_DUAL_STEPPER_DRIVERS is now NUM_Z_STEPPER_DRIVERS with a value of 2."
527
+  #error "Z_DUAL_STEPPER_DRIVERS is no longer needed and should be removed."
528
 #elif defined(Z_TRIPLE_STEPPER_DRIVERS)
528
 #elif defined(Z_TRIPLE_STEPPER_DRIVERS)
529
-  #error "Z_TRIPLE_STEPPER_DRIVERS is now NUM_Z_STEPPER_DRIVERS with a value of 3."
529
+  #error "Z_TRIPLE_STEPPER_DRIVERS is no longer needed and should be removed."
530
 #elif defined(Z_QUAD_STEPPER_DRIVERS)
530
 #elif defined(Z_QUAD_STEPPER_DRIVERS)
531
-  #error "Z_QUAD_STEPPER_DRIVERS is now NUM_Z_STEPPER_DRIVERS with a value of 4."
531
+  #error "Z_QUAD_STEPPER_DRIVERS is no longer needed and should be removed."
532
 #elif defined(Z_DUAL_ENDSTOPS) || defined(Z_TRIPLE_ENDSTOPS) || defined(Z_QUAD_ENDSTOPS)
532
 #elif defined(Z_DUAL_ENDSTOPS) || defined(Z_TRIPLE_ENDSTOPS) || defined(Z_QUAD_ENDSTOPS)
533
   #error "Z_(DUAL|TRIPLE|QUAD)_ENDSTOPS is now Z_MULTI_ENDSTOPS."
533
   #error "Z_(DUAL|TRIPLE|QUAD)_ENDSTOPS is now Z_MULTI_ENDSTOPS."
534
 #elif defined(DUGS_UI_MOVE_DIS_OPTION)
534
 #elif defined(DUGS_UI_MOVE_DIS_OPTION)
621
   #error "DWIN_CREALITY_LCD_ENHANCED is now DWIN_LCD_PROUI."
621
   #error "DWIN_CREALITY_LCD_ENHANCED is now DWIN_LCD_PROUI."
622
 #elif defined(LINEAR_AXES)
622
 #elif defined(LINEAR_AXES)
623
   #error "LINEAR_AXES is now NUM_AXES (to account for rotational axes)."
623
   #error "LINEAR_AXES is now NUM_AXES (to account for rotational axes)."
624
+#elif defined(X_DUAL_STEPPER_DRIVERS)
625
+  #error "X_DUAL_STEPPER_DRIVERS is no longer needed and should be removed."
626
+#elif defined(Y_DUAL_STEPPER_DRIVERS)
627
+  #error "Y_DUAL_STEPPER_DRIVERS is no longer needed and should be removed."
628
+#elif defined(NUM_Z_STEPPER_DRIVERS)
629
+  #error "NUM_Z_STEPPER_DRIVERS is no longer needed and should be removed."
624
 #endif
630
 #endif
625
 
631
 
626
 constexpr float arm[] = AXIS_RELATIVE_MODES;
632
 constexpr float arm[] = AXIS_RELATIVE_MODES;
737
  * Multiple Stepper Drivers Per Axis
743
  * Multiple Stepper Drivers Per Axis
738
  */
744
  */
739
 #define GOOD_AXIS_PINS(A) (HAS_##A##_ENABLE && HAS_##A##_STEP && HAS_##A##_DIR)
745
 #define GOOD_AXIS_PINS(A) (HAS_##A##_ENABLE && HAS_##A##_STEP && HAS_##A##_DIR)
740
-#if ENABLED(X_DUAL_STEPPER_DRIVERS)
741
-  #if ENABLED(DUAL_X_CARRIAGE)
742
-    #error "DUAL_X_CARRIAGE is not compatible with X_DUAL_STEPPER_DRIVERS."
743
-  #elif !GOOD_AXIS_PINS(X)
744
-    #error "X_DUAL_STEPPER_DRIVERS requires X2 pins to be defined."
745
-  #endif
746
+#if HAS_X2_STEPPER && !GOOD_AXIS_PINS(X)
747
+  #error "If X2_DRIVER_TYPE is defined, then X2 ENABLE/STEP/DIR pins are also needed."
746
 #endif
748
 #endif
747
 
749
 
748
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS) && !GOOD_AXIS_PINS(Y)
749
-  #error "Y_DUAL_STEPPER_DRIVERS requires Y2 pins to be defined."
750
+#if HAS_DUAL_Y_STEPPERS && !GOOD_AXIS_PINS(Y)
751
+  #error "If Y2_DRIVER_TYPE is defined, then Y2 ENABLE/STEP/DIR pins are also needed."
750
 #endif
752
 #endif
751
 
753
 
752
 #if HAS_Z_AXIS
754
 #if HAS_Z_AXIS
753
-  #if !WITHIN(NUM_Z_STEPPER_DRIVERS, 1, 4)
754
-    #error "NUM_Z_STEPPER_DRIVERS must be an integer from 1 to 4."
755
-  #elif NUM_Z_STEPPER_DRIVERS == 2 && !GOOD_AXIS_PINS(Z2)
756
-    #error "If NUM_Z_STEPPER_DRIVERS is 2, you must define stepper pins for Z2."
757
-  #elif NUM_Z_STEPPER_DRIVERS == 3 && !(GOOD_AXIS_PINS(Z2) && GOOD_AXIS_PINS(Z3))
758
-    #error "If NUM_Z_STEPPER_DRIVERS is 3, you must define stepper pins for Z2 and Z3."
759
-  #elif NUM_Z_STEPPER_DRIVERS == 4 && !(GOOD_AXIS_PINS(Z2) && GOOD_AXIS_PINS(Z3) && GOOD_AXIS_PINS(Z4))
760
-    #error "If NUM_Z_STEPPER_DRIVERS is 4, you must define stepper pins for Z2, Z3, and Z4."
755
+  #if NUM_Z_STEPPERS >= 2 && !GOOD_AXIS_PINS(Z2)
756
+    #error "If Z2_DRIVER_TYPE is defined, then Z2 ENABLE/STEP/DIR pins are also needed."
757
+  #elif NUM_Z_STEPPERS >= 3 && !GOOD_AXIS_PINS(Z3)
758
+    #error "If Z3_DRIVER_TYPE is defined, then Z3 ENABLE/STEP/DIR pins are also needed."
759
+  #elif NUM_Z_STEPPERS >= 4 && !GOOD_AXIS_PINS(Z4)
760
+    #error "If Z4_DRIVER_TYPE is defined, then Z4 ENABLE/STEP/DIR pins are also needed."
761
   #endif
761
   #endif
762
 #endif
762
 #endif
763
 
763
 
2637
     #error "Z_MULTI_ENDSTOPS is not compatible with DELTA."
2637
     #error "Z_MULTI_ENDSTOPS is not compatible with DELTA."
2638
   #elif !Z2_USE_ENDSTOP
2638
   #elif !Z2_USE_ENDSTOP
2639
     #error "Z2_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS."
2639
     #error "Z2_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS."
2640
-  #elif !Z3_USE_ENDSTOP && NUM_Z_STEPPER_DRIVERS >= 3
2641
-    #error "Z3_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and NUM_Z_STEPPER_DRIVERS >= 3."
2642
-  #elif !Z4_USE_ENDSTOP && NUM_Z_STEPPER_DRIVERS >= 4
2643
-    #error "Z4_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and NUM_Z_STEPPER_DRIVERS >= 4."
2640
+  #elif !Z3_USE_ENDSTOP && NUM_Z_STEPPERS >= 3
2641
+    #error "Z3_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and Z3_DRIVER_TYPE."
2642
+  #elif !Z4_USE_ENDSTOP && NUM_Z_STEPPERS >= 4
2643
+    #error "Z4_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and Z4_DRIVER_TYPE."
2644
   #endif
2644
   #endif
2645
 #endif
2645
 #endif
2646
 
2646
 
3701
 #endif
3701
 #endif
3702
 
3702
 
3703
 #if ENABLED(Z_STEPPER_AUTO_ALIGN)
3703
 #if ENABLED(Z_STEPPER_AUTO_ALIGN)
3704
-  #if NUM_Z_STEPPER_DRIVERS <= 1
3705
-    #error "Z_STEPPER_AUTO_ALIGN requires NUM_Z_STEPPER_DRIVERS greater than 1."
3704
+  #if NUM_Z_STEPPERS <= 1
3705
+    #error "Z_STEPPER_AUTO_ALIGN requires more than one Z stepper."
3706
   #elif !HAS_BED_PROBE
3706
   #elif !HAS_BED_PROBE
3707
     #error "Z_STEPPER_AUTO_ALIGN requires a Z-bed probe."
3707
     #error "Z_STEPPER_AUTO_ALIGN requires a Z-bed probe."
3708
   #elif HAS_Z_STEPPER_ALIGN_STEPPER_XY
3708
   #elif HAS_Z_STEPPER_ALIGN_STEPPER_XY
3709
     static_assert(WITHIN(Z_STEPPER_ALIGN_AMP, 0.5, 2.0), "Z_STEPPER_ALIGN_AMP must be between 0.5 and 2.0.");
3709
     static_assert(WITHIN(Z_STEPPER_ALIGN_AMP, 0.5, 2.0), "Z_STEPPER_ALIGN_AMP must be between 0.5 and 2.0.");
3710
-    #if NUM_Z_STEPPER_DRIVERS < 3
3711
-      #error "Z_STEPPER_ALIGN_STEPPER_XY requires NUM_Z_STEPPER_DRIVERS to be 3 or 4."
3710
+    #if NUM_Z_STEPPERS < 3
3711
+      #error "Z_STEPPER_ALIGN_STEPPER_XY requires 3 or 4 Z steppers."
3712
     #endif
3712
     #endif
3713
   #endif
3713
   #endif
3714
 #endif
3714
 #endif

+ 2
- 2
Marlin/src/lcd/e3v2/proui/dwin.cpp View File

2090
       DWIN_UpdateLCD();
2090
       DWIN_UpdateLCD();
2091
     }
2091
     }
2092
   #endif
2092
   #endif
2093
-  #if ENABLED(HAS_COLOR_LEDS)
2093
+  #if HAS_COLOR_LEDS
2094
     void LiveLedColorR() { leds.color.r = MenuData.Value; HMI_data.Led_Color = leds.color; leds.update(); }
2094
     void LiveLedColorR() { leds.color.r = MenuData.Value; HMI_data.Led_Color = leds.color; leds.update(); }
2095
     void SetLedColorR() { SetIntOnClick(0, 255, leds.color.r, nullptr, LiveLedColorR); }
2095
     void SetLedColorR() { SetIntOnClick(0, 255, leds.color.r, nullptr, LiveLedColorR); }
2096
     void LiveLedColorG() { leds.color.g = MenuData.Value; HMI_data.Led_Color = leds.color; leds.update(); }
2096
     void LiveLedColorG() { leds.color.g = MenuData.Value; HMI_data.Led_Color = leds.color; leds.update(); }
3260
         #if !BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
3260
         #if !BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
3261
           MENU_ITEM(ICON_LedControl, GET_TEXT_F(MSG_LEDS), onDrawLedStatus, SetLedStatus);
3261
           MENU_ITEM(ICON_LedControl, GET_TEXT_F(MSG_LEDS), onDrawLedStatus, SetLedStatus);
3262
         #endif
3262
         #endif
3263
-        #if (HAS_COLOR_LEDS)
3263
+        #if HAS_COLOR_LEDS
3264
           EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_RED), onDrawPInt8Menu, SetLedColorR, &leds.color.r);
3264
           EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_RED), onDrawPInt8Menu, SetLedColorR, &leds.color.r);
3265
           EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_GREEN), onDrawPInt8Menu, SetLedColorG, &leds.color.g);
3265
           EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_GREEN), onDrawPInt8Menu, SetLedColorG, &leds.color.g);
3266
           EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_BLUE), onDrawPInt8Menu, SetLedColorB, &leds.color.b);
3266
           EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_BLUE), onDrawPInt8Menu, SetLedColorB, &leds.color.b);

+ 2
- 2
Marlin/src/libs/L64XX/L64XX_Marlin.cpp View File

69
 #define _EN_ITEM(N) , ENABLED(INVERT_E##N##_DIR)
69
 #define _EN_ITEM(N) , ENABLED(INVERT_E##N##_DIR)
70
 const uint8_t L64XX_Marlin::index_to_dir[MAX_L64XX] = {
70
 const uint8_t L64XX_Marlin::index_to_dir[MAX_L64XX] = {
71
     NUM_AXIS_LIST(ENABLED(INVERT_X_DIR), ENABLED(INVERT_Y_DIR), ENABLED(INVERT_Z_DIR), ENABLED(INVERT_I_DIR), ENABLED(INVERT_J_DIR), ENABLED(INVERT_K_DIR), ENABLED(INVERT_U_DIR), ENABLED(INVERT_V_DIR), ENABLED(INVERT_W_DIR))
71
     NUM_AXIS_LIST(ENABLED(INVERT_X_DIR), ENABLED(INVERT_Y_DIR), ENABLED(INVERT_Z_DIR), ENABLED(INVERT_I_DIR), ENABLED(INVERT_J_DIR), ENABLED(INVERT_K_DIR), ENABLED(INVERT_U_DIR), ENABLED(INVERT_V_DIR), ENABLED(INVERT_W_DIR))
72
-  , ENABLED(INVERT_X_DIR) ^ BOTH(X_DUAL_STEPPER_DRIVERS, INVERT_X2_VS_X_DIR) // X2
73
-  , ENABLED(INVERT_Y_DIR) ^ BOTH(Y_DUAL_STEPPER_DRIVERS, INVERT_Y2_VS_Y_DIR) // Y2
72
+  , ENABLED(INVERT_X_DIR) ^ BOTH(HAS_DUAL_X_STEPPERS, INVERT_X2_VS_X_DIR) // X2
73
+  , ENABLED(INVERT_Y_DIR) ^ BOTH(HAS_DUAL_Y_STEPPERS, INVERT_Y2_VS_Y_DIR) // Y2
74
   , ENABLED(INVERT_Z_DIR) ^ ENABLED(INVERT_Z2_VS_Z_DIR) // Z2
74
   , ENABLED(INVERT_Z_DIR) ^ ENABLED(INVERT_Z2_VS_Z_DIR) // Z2
75
   , ENABLED(INVERT_Z_DIR) ^ ENABLED(INVERT_Z3_VS_Z_DIR) // Z3
75
   , ENABLED(INVERT_Z_DIR) ^ ENABLED(INVERT_Z3_VS_Z_DIR) // Z3
76
   , ENABLED(INVERT_Z_DIR) ^ ENABLED(INVERT_Z4_VS_Z_DIR) // Z4
76
   , ENABLED(INVERT_Z_DIR) ^ ENABLED(INVERT_Z4_VS_Z_DIR) // Z4

+ 8
- 8
Marlin/src/module/endstops.cpp View File

78
 #endif
78
 #endif
79
 #if ENABLED(Z_MULTI_ENDSTOPS)
79
 #if ENABLED(Z_MULTI_ENDSTOPS)
80
   float Endstops::z2_endstop_adj;
80
   float Endstops::z2_endstop_adj;
81
-  #if NUM_Z_STEPPER_DRIVERS >= 3
81
+  #if NUM_Z_STEPPERS >= 3
82
     float Endstops::z3_endstop_adj;
82
     float Endstops::z3_endstop_adj;
83
-    #if NUM_Z_STEPPER_DRIVERS >= 4
83
+    #if NUM_Z_STEPPERS >= 4
84
       float Endstops::z4_endstop_adj;
84
       float Endstops::z4_endstop_adj;
85
     #endif
85
     #endif
86
   #endif
86
   #endif
792
       #else
792
       #else
793
         COPY_LIVE_STATE(Z_MIN, Z2_MIN);
793
         COPY_LIVE_STATE(Z_MIN, Z2_MIN);
794
       #endif
794
       #endif
795
-      #if NUM_Z_STEPPER_DRIVERS >= 3
795
+      #if NUM_Z_STEPPERS >= 3
796
         #if HAS_Z3_MIN
796
         #if HAS_Z3_MIN
797
           UPDATE_ENDSTOP_BIT(Z3, MIN);
797
           UPDATE_ENDSTOP_BIT(Z3, MIN);
798
         #else
798
         #else
799
           COPY_LIVE_STATE(Z_MIN, Z3_MIN);
799
           COPY_LIVE_STATE(Z_MIN, Z3_MIN);
800
         #endif
800
         #endif
801
       #endif
801
       #endif
802
-      #if NUM_Z_STEPPER_DRIVERS >= 4
802
+      #if NUM_Z_STEPPERS >= 4
803
         #if HAS_Z4_MIN
803
         #if HAS_Z4_MIN
804
           UPDATE_ENDSTOP_BIT(Z4, MIN);
804
           UPDATE_ENDSTOP_BIT(Z4, MIN);
805
         #else
805
         #else
824
       #else
824
       #else
825
         COPY_LIVE_STATE(Z_MAX, Z2_MAX);
825
         COPY_LIVE_STATE(Z_MAX, Z2_MAX);
826
       #endif
826
       #endif
827
-      #if NUM_Z_STEPPER_DRIVERS >= 3
827
+      #if NUM_Z_STEPPERS >= 3
828
         #if HAS_Z3_MAX
828
         #if HAS_Z3_MAX
829
           UPDATE_ENDSTOP_BIT(Z3, MAX);
829
           UPDATE_ENDSTOP_BIT(Z3, MAX);
830
         #else
830
         #else
831
           COPY_LIVE_STATE(Z_MAX, Z3_MAX);
831
           COPY_LIVE_STATE(Z_MAX, Z3_MAX);
832
         #endif
832
         #endif
833
       #endif
833
       #endif
834
-      #if NUM_Z_STEPPER_DRIVERS >= 4
834
+      #if NUM_Z_STEPPERS >= 4
835
         #if HAS_Z4_MAX
835
         #if HAS_Z4_MAX
836
           UPDATE_ENDSTOP_BIT(Z4, MAX);
836
           UPDATE_ENDSTOP_BIT(Z4, MAX);
837
         #else
837
         #else
1090
 
1090
 
1091
   #if DISABLED(Z_MULTI_ENDSTOPS)
1091
   #if DISABLED(Z_MULTI_ENDSTOPS)
1092
     #define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_ENDSTOP(Z, MINMAX)
1092
     #define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_ENDSTOP(Z, MINMAX)
1093
-  #elif NUM_Z_STEPPER_DRIVERS == 4
1093
+  #elif NUM_Z_STEPPERS == 4
1094
     #define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_QUAD_ENDSTOP(Z, MINMAX)
1094
     #define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_QUAD_ENDSTOP(Z, MINMAX)
1095
-  #elif NUM_Z_STEPPER_DRIVERS == 3
1095
+  #elif NUM_Z_STEPPERS == 3
1096
     #define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_TRIPLE_ENDSTOP(Z, MINMAX)
1096
     #define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_TRIPLE_ENDSTOP(Z, MINMAX)
1097
   #else
1097
   #else
1098
     #define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_DUAL_ENDSTOP(Z, MINMAX)
1098
     #define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_DUAL_ENDSTOP(Z, MINMAX)

+ 4
- 4
Marlin/src/module/endstops.h View File

64
   #if ENABLED(Z_MULTI_ENDSTOPS)
64
   #if ENABLED(Z_MULTI_ENDSTOPS)
65
     _ES_ITEM(HAS_Z_MIN, Z2_MIN)
65
     _ES_ITEM(HAS_Z_MIN, Z2_MIN)
66
     _ES_ITEM(HAS_Z_MAX, Z2_MAX)
66
     _ES_ITEM(HAS_Z_MAX, Z2_MAX)
67
-    #if NUM_Z_STEPPER_DRIVERS >= 3
67
+    #if NUM_Z_STEPPERS >= 3
68
       _ES_ITEM(HAS_Z_MIN, Z3_MIN)
68
       _ES_ITEM(HAS_Z_MIN, Z3_MIN)
69
       _ES_ITEM(HAS_Z_MAX, Z3_MAX)
69
       _ES_ITEM(HAS_Z_MAX, Z3_MAX)
70
     #endif
70
     #endif
71
-    #if NUM_Z_STEPPER_DRIVERS >= 4
71
+    #if NUM_Z_STEPPERS >= 4
72
       _ES_ITEM(HAS_Z_MIN, Z4_MIN)
72
       _ES_ITEM(HAS_Z_MIN, Z4_MIN)
73
       _ES_ITEM(HAS_Z_MAX, Z4_MAX)
73
       _ES_ITEM(HAS_Z_MAX, Z4_MAX)
74
     #endif
74
     #endif
120
     #if ENABLED(Z_MULTI_ENDSTOPS)
120
     #if ENABLED(Z_MULTI_ENDSTOPS)
121
       static float z2_endstop_adj;
121
       static float z2_endstop_adj;
122
     #endif
122
     #endif
123
-    #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3
123
+    #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 3
124
       static float z3_endstop_adj;
124
       static float z3_endstop_adj;
125
     #endif
125
     #endif
126
-    #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4
126
+    #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 4
127
       static float z4_endstop_adj;
127
       static float z4_endstop_adj;
128
     #endif
128
     #endif
129
 
129
 

+ 7
- 7
Marlin/src/module/motion.cpp View File

2038
       #if ENABLED(Z_MULTI_ENDSTOPS)
2038
       #if ENABLED(Z_MULTI_ENDSTOPS)
2039
         if (axis == Z_AXIS) {
2039
         if (axis == Z_AXIS) {
2040
 
2040
 
2041
-          #if NUM_Z_STEPPER_DRIVERS == 2
2041
+          #if NUM_Z_STEPPERS == 2
2042
 
2042
 
2043
             const float adj = ABS(endstops.z2_endstop_adj);
2043
             const float adj = ABS(endstops.z2_endstop_adj);
2044
             if (adj) {
2044
             if (adj) {
2056
 
2056
 
2057
             adjustFunc_t lock[] = {
2057
             adjustFunc_t lock[] = {
2058
               stepper.set_z1_lock, stepper.set_z2_lock, stepper.set_z3_lock
2058
               stepper.set_z1_lock, stepper.set_z2_lock, stepper.set_z3_lock
2059
-              #if NUM_Z_STEPPER_DRIVERS >= 4
2059
+              #if NUM_Z_STEPPERS >= 4
2060
                 , stepper.set_z4_lock
2060
                 , stepper.set_z4_lock
2061
               #endif
2061
               #endif
2062
             };
2062
             };
2063
             float adj[] = {
2063
             float adj[] = {
2064
               0, endstops.z2_endstop_adj, endstops.z3_endstop_adj
2064
               0, endstops.z2_endstop_adj, endstops.z3_endstop_adj
2065
-              #if NUM_Z_STEPPER_DRIVERS >= 4
2065
+              #if NUM_Z_STEPPERS >= 4
2066
                 , endstops.z4_endstop_adj
2066
                 , endstops.z4_endstop_adj
2067
               #endif
2067
               #endif
2068
             };
2068
             };
2081
               lock[1] = lock[2], adj[1] = adj[2];
2081
               lock[1] = lock[2], adj[1] = adj[2];
2082
               lock[2] = tempLock, adj[2] = tempAdj;
2082
               lock[2] = tempLock, adj[2] = tempAdj;
2083
             }
2083
             }
2084
-            #if NUM_Z_STEPPER_DRIVERS >= 4
2084
+            #if NUM_Z_STEPPERS >= 4
2085
               if (adj[3] < adj[2]) {
2085
               if (adj[3] < adj[2]) {
2086
                 tempLock = lock[2], tempAdj = adj[2];
2086
                 tempLock = lock[2], tempAdj = adj[2];
2087
                 lock[2] = lock[3], adj[2] = adj[3];
2087
                 lock[2] = lock[3], adj[2] = adj[3];
2106
               // lock the second stepper for the final correction
2106
               // lock the second stepper for the final correction
2107
               (*lock[1])(true);
2107
               (*lock[1])(true);
2108
               do_homing_move(axis, adj[2] - adj[1]);
2108
               do_homing_move(axis, adj[2] - adj[1]);
2109
-              #if NUM_Z_STEPPER_DRIVERS >= 4
2109
+              #if NUM_Z_STEPPERS >= 4
2110
                 // lock the third stepper for the final correction
2110
                 // lock the third stepper for the final correction
2111
                 (*lock[2])(true);
2111
                 (*lock[2])(true);
2112
                 do_homing_move(axis, adj[3] - adj[2]);
2112
                 do_homing_move(axis, adj[3] - adj[2]);
2113
               #endif
2113
               #endif
2114
             }
2114
             }
2115
             else {
2115
             else {
2116
-              #if NUM_Z_STEPPER_DRIVERS >= 4
2116
+              #if NUM_Z_STEPPERS >= 4
2117
                 (*lock[3])(true);
2117
                 (*lock[3])(true);
2118
                 do_homing_move(axis, adj[2] - adj[3]);
2118
                 do_homing_move(axis, adj[2] - adj[3]);
2119
               #endif
2119
               #endif
2126
             stepper.set_z1_lock(false);
2126
             stepper.set_z1_lock(false);
2127
             stepper.set_z2_lock(false);
2127
             stepper.set_z2_lock(false);
2128
             stepper.set_z3_lock(false);
2128
             stepper.set_z3_lock(false);
2129
-            #if NUM_Z_STEPPER_DRIVERS >= 4
2129
+            #if NUM_Z_STEPPERS >= 4
2130
               stepper.set_z4_lock(false);
2130
               stepper.set_z4_lock(false);
2131
             #endif
2131
             #endif
2132
 
2132
 

+ 8
- 8
Marlin/src/module/settings.cpp View File

347
   // Z_STEPPER_AUTO_ALIGN, HAS_Z_STEPPER_ALIGN_STEPPER_XY
347
   // Z_STEPPER_AUTO_ALIGN, HAS_Z_STEPPER_ALIGN_STEPPER_XY
348
   //
348
   //
349
   #if ENABLED(Z_STEPPER_AUTO_ALIGN)
349
   #if ENABLED(Z_STEPPER_AUTO_ALIGN)
350
-    xy_pos_t z_stepper_align_xy[NUM_Z_STEPPER_DRIVERS];             // M422 S X Y
350
+    xy_pos_t z_stepper_align_xy[NUM_Z_STEPPERS];             // M422 S X Y
351
     #if HAS_Z_STEPPER_ALIGN_STEPPER_XY
351
     #if HAS_Z_STEPPER_ALIGN_STEPPER_XY
352
-      xy_pos_t z_stepper_align_stepper_xy[NUM_Z_STEPPER_DRIVERS];   // M422 W X Y
352
+      xy_pos_t z_stepper_align_stepper_xy[NUM_Z_STEPPERS];   // M422 W X Y
353
     #endif
353
     #endif
354
   #endif
354
   #endif
355
 
355
 
1017
       EEPROM_WRITE(TERN(Y_DUAL_ENDSTOPS, endstops.y2_endstop_adj, dummyf));   // 1 float
1017
       EEPROM_WRITE(TERN(Y_DUAL_ENDSTOPS, endstops.y2_endstop_adj, dummyf));   // 1 float
1018
       EEPROM_WRITE(TERN(Z_MULTI_ENDSTOPS, endstops.z2_endstop_adj, dummyf));  // 1 float
1018
       EEPROM_WRITE(TERN(Z_MULTI_ENDSTOPS, endstops.z2_endstop_adj, dummyf));  // 1 float
1019
 
1019
 
1020
-      #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3
1020
+      #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 3
1021
         EEPROM_WRITE(endstops.z3_endstop_adj);   // 1 float
1021
         EEPROM_WRITE(endstops.z3_endstop_adj);   // 1 float
1022
       #else
1022
       #else
1023
         EEPROM_WRITE(dummyf);
1023
         EEPROM_WRITE(dummyf);
1024
       #endif
1024
       #endif
1025
 
1025
 
1026
-      #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4
1026
+      #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 4
1027
         EEPROM_WRITE(endstops.z4_endstop_adj);   // 1 float
1027
         EEPROM_WRITE(endstops.z4_endstop_adj);   // 1 float
1028
       #else
1028
       #else
1029
         EEPROM_WRITE(dummyf);
1029
         EEPROM_WRITE(dummyf);
1969
         EEPROM_READ(TERN(Y_DUAL_ENDSTOPS, endstops.y2_endstop_adj, dummyf));  // 1 float
1969
         EEPROM_READ(TERN(Y_DUAL_ENDSTOPS, endstops.y2_endstop_adj, dummyf));  // 1 float
1970
         EEPROM_READ(TERN(Z_MULTI_ENDSTOPS, endstops.z2_endstop_adj, dummyf)); // 1 float
1970
         EEPROM_READ(TERN(Z_MULTI_ENDSTOPS, endstops.z2_endstop_adj, dummyf)); // 1 float
1971
 
1971
 
1972
-        #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3
1972
+        #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 3
1973
           EEPROM_READ(endstops.z3_endstop_adj); // 1 float
1973
           EEPROM_READ(endstops.z3_endstop_adj); // 1 float
1974
         #else
1974
         #else
1975
           EEPROM_READ(dummyf);
1975
           EEPROM_READ(dummyf);
1976
         #endif
1976
         #endif
1977
-        #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4
1977
+        #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 4
1978
           EEPROM_READ(endstops.z4_endstop_adj); // 1 float
1978
           EEPROM_READ(endstops.z4_endstop_adj); // 1 float
1979
         #else
1979
         #else
1980
           EEPROM_READ(dummyf);
1980
           EEPROM_READ(dummyf);
3042
       #define Z2_ENDSTOP_ADJUSTMENT 0
3042
       #define Z2_ENDSTOP_ADJUSTMENT 0
3043
     #endif
3043
     #endif
3044
     endstops.z2_endstop_adj = Z2_ENDSTOP_ADJUSTMENT;
3044
     endstops.z2_endstop_adj = Z2_ENDSTOP_ADJUSTMENT;
3045
-    #if NUM_Z_STEPPER_DRIVERS >= 3
3045
+    #if NUM_Z_STEPPERS >= 3
3046
       #ifndef Z3_ENDSTOP_ADJUSTMENT
3046
       #ifndef Z3_ENDSTOP_ADJUSTMENT
3047
         #define Z3_ENDSTOP_ADJUSTMENT 0
3047
         #define Z3_ENDSTOP_ADJUSTMENT 0
3048
       #endif
3048
       #endif
3049
       endstops.z3_endstop_adj = Z3_ENDSTOP_ADJUSTMENT;
3049
       endstops.z3_endstop_adj = Z3_ENDSTOP_ADJUSTMENT;
3050
     #endif
3050
     #endif
3051
-    #if NUM_Z_STEPPER_DRIVERS >= 4
3051
+    #if NUM_Z_STEPPERS >= 4
3052
       #ifndef Z4_ENDSTOP_ADJUSTMENT
3052
       #ifndef Z4_ENDSTOP_ADJUSTMENT
3053
         #define Z4_ENDSTOP_ADJUSTMENT 0
3053
         #define Z4_ENDSTOP_ADJUSTMENT 0
3054
       #endif
3054
       #endif

+ 20
- 20
Marlin/src/module/stepper.cpp View File

177
 
177
 
178
 #if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
178
 #if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
179
   bool Stepper::locked_Z_motor = false, Stepper::locked_Z2_motor = false
179
   bool Stepper::locked_Z_motor = false, Stepper::locked_Z2_motor = false
180
-    #if NUM_Z_STEPPER_DRIVERS >= 3
180
+    #if NUM_Z_STEPPERS >= 3
181
       , Stepper::locked_Z3_motor = false
181
       , Stepper::locked_Z3_motor = false
182
-      #if NUM_Z_STEPPER_DRIVERS >= 4
182
+      #if NUM_Z_STEPPERS >= 4
183
         , Stepper::locked_Z4_motor = false
183
         , Stepper::locked_Z4_motor = false
184
       #endif
184
       #endif
185
     #endif
185
     #endif
365
     A##4_STEP_WRITE(V);                           \
365
     A##4_STEP_WRITE(V);                           \
366
   }
366
   }
367
 
367
 
368
-#if ENABLED(X_DUAL_STEPPER_DRIVERS)
368
+#if HAS_DUAL_X_STEPPERS
369
   #define X_APPLY_DIR(v,Q) do{ X_DIR_WRITE(v); X2_DIR_WRITE((v) ^ ENABLED(INVERT_X2_VS_X_DIR)); }while(0)
369
   #define X_APPLY_DIR(v,Q) do{ X_DIR_WRITE(v); X2_DIR_WRITE((v) ^ ENABLED(INVERT_X2_VS_X_DIR)); }while(0)
370
   #if ENABLED(X_DUAL_ENDSTOPS)
370
   #if ENABLED(X_DUAL_ENDSTOPS)
371
     #define X_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(X,v)
371
     #define X_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(X,v)
386
   #define X_APPLY_STEP(v,Q) X_STEP_WRITE(v)
386
   #define X_APPLY_STEP(v,Q) X_STEP_WRITE(v)
387
 #endif
387
 #endif
388
 
388
 
389
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
389
+#if HAS_DUAL_Y_STEPPERS
390
   #define Y_APPLY_DIR(v,Q) do{ Y_DIR_WRITE(v); Y2_DIR_WRITE((v) ^ ENABLED(INVERT_Y2_VS_Y_DIR)); }while(0)
390
   #define Y_APPLY_DIR(v,Q) do{ Y_DIR_WRITE(v); Y2_DIR_WRITE((v) ^ ENABLED(INVERT_Y2_VS_Y_DIR)); }while(0)
391
   #if ENABLED(Y_DUAL_ENDSTOPS)
391
   #if ENABLED(Y_DUAL_ENDSTOPS)
392
     #define Y_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(Y,v)
392
     #define Y_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(Y,v)
398
   #define Y_APPLY_STEP(v,Q) Y_STEP_WRITE(v)
398
   #define Y_APPLY_STEP(v,Q) Y_STEP_WRITE(v)
399
 #endif
399
 #endif
400
 
400
 
401
-#if NUM_Z_STEPPER_DRIVERS == 4
401
+#if NUM_Z_STEPPERS == 4
402
   #define Z_APPLY_DIR(v,Q) do{ \
402
   #define Z_APPLY_DIR(v,Q) do{ \
403
     Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); \
403
     Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); \
404
     Z3_DIR_WRITE((v) ^ ENABLED(INVERT_Z3_VS_Z_DIR)); Z4_DIR_WRITE((v) ^ ENABLED(INVERT_Z4_VS_Z_DIR)); \
404
     Z3_DIR_WRITE((v) ^ ENABLED(INVERT_Z3_VS_Z_DIR)); Z4_DIR_WRITE((v) ^ ENABLED(INVERT_Z4_VS_Z_DIR)); \
410
   #else
410
   #else
411
     #define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); Z3_STEP_WRITE(v); Z4_STEP_WRITE(v); }while(0)
411
     #define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); Z3_STEP_WRITE(v); Z4_STEP_WRITE(v); }while(0)
412
   #endif
412
   #endif
413
-#elif NUM_Z_STEPPER_DRIVERS == 3
413
+#elif NUM_Z_STEPPERS == 3
414
   #define Z_APPLY_DIR(v,Q) do{ \
414
   #define Z_APPLY_DIR(v,Q) do{ \
415
     Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); Z3_DIR_WRITE((v) ^ ENABLED(INVERT_Z3_VS_Z_DIR)); \
415
     Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); Z3_DIR_WRITE((v) ^ ENABLED(INVERT_Z3_VS_Z_DIR)); \
416
   }while(0)
416
   }while(0)
421
   #else
421
   #else
422
     #define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); Z3_STEP_WRITE(v); }while(0)
422
     #define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); Z3_STEP_WRITE(v); }while(0)
423
   #endif
423
   #endif
424
-#elif NUM_Z_STEPPER_DRIVERS == 2
424
+#elif NUM_Z_STEPPERS == 2
425
   #define Z_APPLY_DIR(v,Q) do{ Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); }while(0)
425
   #define Z_APPLY_DIR(v,Q) do{ Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); }while(0)
426
   #if ENABLED(Z_MULTI_ENDSTOPS)
426
   #if ENABLED(Z_MULTI_ENDSTOPS)
427
     #define Z_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(Z,v)
427
     #define Z_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(Z,v)
2613
   TERN_(HAS_X2_DIR, X2_DIR_INIT());
2613
   TERN_(HAS_X2_DIR, X2_DIR_INIT());
2614
   #if HAS_Y_DIR
2614
   #if HAS_Y_DIR
2615
     Y_DIR_INIT();
2615
     Y_DIR_INIT();
2616
-    #if BOTH(Y_DUAL_STEPPER_DRIVERS, HAS_Y2_DIR)
2616
+    #if BOTH(HAS_DUAL_Y_STEPPERS, HAS_Y2_DIR)
2617
       Y2_DIR_INIT();
2617
       Y2_DIR_INIT();
2618
     #endif
2618
     #endif
2619
   #endif
2619
   #endif
2620
   #if HAS_Z_DIR
2620
   #if HAS_Z_DIR
2621
     Z_DIR_INIT();
2621
     Z_DIR_INIT();
2622
-    #if NUM_Z_STEPPER_DRIVERS >= 2 && HAS_Z2_DIR
2622
+    #if NUM_Z_STEPPERS >= 2 && HAS_Z2_DIR
2623
       Z2_DIR_INIT();
2623
       Z2_DIR_INIT();
2624
     #endif
2624
     #endif
2625
-    #if NUM_Z_STEPPER_DRIVERS >= 3 && HAS_Z3_DIR
2625
+    #if NUM_Z_STEPPERS >= 3 && HAS_Z3_DIR
2626
       Z3_DIR_INIT();
2626
       Z3_DIR_INIT();
2627
     #endif
2627
     #endif
2628
-    #if NUM_Z_STEPPER_DRIVERS >= 4 && HAS_Z4_DIR
2628
+    #if NUM_Z_STEPPERS >= 4 && HAS_Z4_DIR
2629
       Z4_DIR_INIT();
2629
       Z4_DIR_INIT();
2630
     #endif
2630
     #endif
2631
   #endif
2631
   #endif
2684
   #if HAS_Y_ENABLE
2684
   #if HAS_Y_ENABLE
2685
     Y_ENABLE_INIT();
2685
     Y_ENABLE_INIT();
2686
     if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
2686
     if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
2687
-    #if BOTH(Y_DUAL_STEPPER_DRIVERS, HAS_Y2_ENABLE)
2687
+    #if BOTH(HAS_DUAL_Y_STEPPERS, HAS_Y2_ENABLE)
2688
       Y2_ENABLE_INIT();
2688
       Y2_ENABLE_INIT();
2689
       if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
2689
       if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
2690
     #endif
2690
     #endif
2692
   #if HAS_Z_ENABLE
2692
   #if HAS_Z_ENABLE
2693
     Z_ENABLE_INIT();
2693
     Z_ENABLE_INIT();
2694
     if (!Z_ENABLE_ON) Z_ENABLE_WRITE(HIGH);
2694
     if (!Z_ENABLE_ON) Z_ENABLE_WRITE(HIGH);
2695
-    #if NUM_Z_STEPPER_DRIVERS >= 2 && HAS_Z2_ENABLE
2695
+    #if NUM_Z_STEPPERS >= 2 && HAS_Z2_ENABLE
2696
       Z2_ENABLE_INIT();
2696
       Z2_ENABLE_INIT();
2697
       if (!Z_ENABLE_ON) Z2_ENABLE_WRITE(HIGH);
2697
       if (!Z_ENABLE_ON) Z2_ENABLE_WRITE(HIGH);
2698
     #endif
2698
     #endif
2699
-    #if NUM_Z_STEPPER_DRIVERS >= 3 && HAS_Z3_ENABLE
2699
+    #if NUM_Z_STEPPERS >= 3 && HAS_Z3_ENABLE
2700
       Z3_ENABLE_INIT();
2700
       Z3_ENABLE_INIT();
2701
       if (!Z_ENABLE_ON) Z3_ENABLE_WRITE(HIGH);
2701
       if (!Z_ENABLE_ON) Z3_ENABLE_WRITE(HIGH);
2702
     #endif
2702
     #endif
2703
-    #if NUM_Z_STEPPER_DRIVERS >= 4 && HAS_Z4_ENABLE
2703
+    #if NUM_Z_STEPPERS >= 4 && HAS_Z4_ENABLE
2704
       Z4_ENABLE_INIT();
2704
       Z4_ENABLE_INIT();
2705
       if (!Z_ENABLE_ON) Z4_ENABLE_WRITE(HIGH);
2705
       if (!Z_ENABLE_ON) Z4_ENABLE_WRITE(HIGH);
2706
     #endif
2706
     #endif
2775
 
2775
 
2776
   // Init Step Pins
2776
   // Init Step Pins
2777
   #if HAS_X_STEP
2777
   #if HAS_X_STEP
2778
-    #if EITHER(X_DUAL_STEPPER_DRIVERS, DUAL_X_CARRIAGE)
2778
+    #if HAS_X2_STEPPER
2779
       X2_STEP_INIT();
2779
       X2_STEP_INIT();
2780
       X2_STEP_WRITE(INVERT_X_STEP_PIN);
2780
       X2_STEP_WRITE(INVERT_X_STEP_PIN);
2781
     #endif
2781
     #endif
2783
   #endif
2783
   #endif
2784
 
2784
 
2785
   #if HAS_Y_STEP
2785
   #if HAS_Y_STEP
2786
-    #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
2786
+    #if HAS_DUAL_Y_STEPPERS
2787
       Y2_STEP_INIT();
2787
       Y2_STEP_INIT();
2788
       Y2_STEP_WRITE(INVERT_Y_STEP_PIN);
2788
       Y2_STEP_WRITE(INVERT_Y_STEP_PIN);
2789
     #endif
2789
     #endif
2791
   #endif
2791
   #endif
2792
 
2792
 
2793
   #if HAS_Z_STEP
2793
   #if HAS_Z_STEP
2794
-    #if NUM_Z_STEPPER_DRIVERS >= 2
2794
+    #if NUM_Z_STEPPERS >= 2
2795
       Z2_STEP_INIT();
2795
       Z2_STEP_INIT();
2796
       Z2_STEP_WRITE(INVERT_Z_STEP_PIN);
2796
       Z2_STEP_WRITE(INVERT_Z_STEP_PIN);
2797
     #endif
2797
     #endif
2798
-    #if NUM_Z_STEPPER_DRIVERS >= 3
2798
+    #if NUM_Z_STEPPERS >= 3
2799
       Z3_STEP_INIT();
2799
       Z3_STEP_INIT();
2800
       Z3_STEP_WRITE(INVERT_Z_STEP_PIN);
2800
       Z3_STEP_WRITE(INVERT_Z_STEP_PIN);
2801
     #endif
2801
     #endif
2802
-    #if NUM_Z_STEPPER_DRIVERS >= 4
2802
+    #if NUM_Z_STEPPERS >= 4
2803
       Z4_STEP_INIT();
2803
       Z4_STEP_INIT();
2804
       Z4_STEP_WRITE(INVERT_Z_STEP_PIN);
2804
       Z4_STEP_WRITE(INVERT_Z_STEP_PIN);
2805
     #endif
2805
     #endif

+ 6
- 6
Marlin/src/module/stepper.h View File

366
     #endif
366
     #endif
367
     #if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
367
     #if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
368
       static bool locked_Z_motor, locked_Z2_motor
368
       static bool locked_Z_motor, locked_Z2_motor
369
-                  #if NUM_Z_STEPPER_DRIVERS >= 3
369
+                  #if NUM_Z_STEPPERS >= 3
370
                     , locked_Z3_motor
370
                     , locked_Z3_motor
371
-                    #if NUM_Z_STEPPER_DRIVERS >= 4
371
+                    #if NUM_Z_STEPPERS >= 4
372
                       , locked_Z4_motor
372
                       , locked_Z4_motor
373
                     #endif
373
                     #endif
374
                   #endif
374
                   #endif
570
     #if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
570
     #if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
571
       FORCE_INLINE static void set_z1_lock(const bool state) { locked_Z_motor = state; }
571
       FORCE_INLINE static void set_z1_lock(const bool state) { locked_Z_motor = state; }
572
       FORCE_INLINE static void set_z2_lock(const bool state) { locked_Z2_motor = state; }
572
       FORCE_INLINE static void set_z2_lock(const bool state) { locked_Z2_motor = state; }
573
-      #if NUM_Z_STEPPER_DRIVERS >= 3
573
+      #if NUM_Z_STEPPERS >= 3
574
         FORCE_INLINE static void set_z3_lock(const bool state) { locked_Z3_motor = state; }
574
         FORCE_INLINE static void set_z3_lock(const bool state) { locked_Z3_motor = state; }
575
-        #if NUM_Z_STEPPER_DRIVERS >= 4
575
+        #if NUM_Z_STEPPERS >= 4
576
           FORCE_INLINE static void set_z4_lock(const bool state) { locked_Z4_motor = state; }
576
           FORCE_INLINE static void set_z4_lock(const bool state) { locked_Z4_motor = state; }
577
         #endif
577
         #endif
578
       #endif
578
       #endif
579
       static void set_all_z_lock(const bool lock, const int8_t except=-1) {
579
       static void set_all_z_lock(const bool lock, const int8_t except=-1) {
580
         set_z1_lock(lock ^ (except == 0));
580
         set_z1_lock(lock ^ (except == 0));
581
         set_z2_lock(lock ^ (except == 1));
581
         set_z2_lock(lock ^ (except == 1));
582
-        #if NUM_Z_STEPPER_DRIVERS >= 3
582
+        #if NUM_Z_STEPPERS >= 3
583
           set_z3_lock(lock ^ (except == 2));
583
           set_z3_lock(lock ^ (except == 2));
584
-          #if NUM_Z_STEPPER_DRIVERS >= 4
584
+          #if NUM_Z_STEPPERS >= 4
585
             set_z4_lock(lock ^ (except == 3));
585
             set_z4_lock(lock ^ (except == 3));
586
           #endif
586
           #endif
587
         #endif
587
         #endif

+ 14
- 14
Marlin/src/pins/pins_postprocess.h View File

486
     #ifndef Z2_USE_ENDSTOP
486
     #ifndef Z2_USE_ENDSTOP
487
       #define Z2_USE_ENDSTOP _ZSTOP_
487
       #define Z2_USE_ENDSTOP _ZSTOP_
488
     #endif
488
     #endif
489
-    #if NUM_Z_STEPPER_DRIVERS >= 3 && !defined(Z3_USE_ENDSTOP)
489
+    #if NUM_Z_STEPPERS >= 3 && !defined(Z3_USE_ENDSTOP)
490
       #define Z3_USE_ENDSTOP _ZSTOP_
490
       #define Z3_USE_ENDSTOP _ZSTOP_
491
     #endif
491
     #endif
492
-    #if NUM_Z_STEPPER_DRIVERS >= 4 && !defined(Z4_USE_ENDSTOP)
492
+    #if NUM_Z_STEPPERS >= 4 && !defined(Z4_USE_ENDSTOP)
493
       #define Z4_USE_ENDSTOP _ZSTOP_
493
       #define Z4_USE_ENDSTOP _ZSTOP_
494
     #endif
494
     #endif
495
   #endif
495
   #endif
775
   #define X2_MS3_PIN -1
775
   #define X2_MS3_PIN -1
776
 #endif
776
 #endif
777
 
777
 
778
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS) && !defined(Y2_DIAG_PIN) && !defined(Y2_STEP_PIN) && !PIN_EXISTS(Y2_CS_PIN)
778
+#if HAS_DUAL_Y_STEPPERS && !defined(Y2_DIAG_PIN) && !defined(Y2_STEP_PIN) && !PIN_EXISTS(Y2_CS_PIN)
779
   #define Z2_E_INDEX INCREMENT(Y2_E_INDEX)
779
   #define Z2_E_INDEX INCREMENT(Y2_E_INDEX)
780
 #else
780
 #else
781
   #define Z2_E_INDEX Y2_E_INDEX
781
   #define Z2_E_INDEX Y2_E_INDEX
782
 #endif
782
 #endif
783
 
783
 
784
 // The Y2 axis, if any, should be the next open extruder port
784
 // The Y2 axis, if any, should be the next open extruder port
785
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
785
+#if HAS_DUAL_Y_STEPPERS
786
   #ifndef Y2_STEP_PIN
786
   #ifndef Y2_STEP_PIN
787
     #define Y2_STEP_PIN   _EPIN(Y2_E_INDEX, STEP)
787
     #define Y2_STEP_PIN   _EPIN(Y2_E_INDEX, STEP)
788
     #define Y2_DIR_PIN    _EPIN(Y2_E_INDEX, DIR)
788
     #define Y2_DIR_PIN    _EPIN(Y2_E_INDEX, DIR)
861
   #define Y2_MS3_PIN -1
861
   #define Y2_MS3_PIN -1
862
 #endif
862
 #endif
863
 
863
 
864
-#if NUM_Z_STEPPER_DRIVERS >= 2 && !defined(Z2_DIAG_PIN) && !defined(Z2_STEP_PIN) && !PIN_EXISTS(Z2_CS_PIN)
864
+#if NUM_Z_STEPPERS >= 2 && !defined(Z2_DIAG_PIN) && !defined(Z2_STEP_PIN) && !PIN_EXISTS(Z2_CS_PIN)
865
   #define Z3_E_INDEX INCREMENT(Z2_E_INDEX)
865
   #define Z3_E_INDEX INCREMENT(Z2_E_INDEX)
866
 #else
866
 #else
867
   #define Z3_E_INDEX Z2_E_INDEX
867
   #define Z3_E_INDEX Z2_E_INDEX
868
 #endif
868
 #endif
869
 
869
 
870
 // The Z2 axis, if any, should be the next open extruder port
870
 // The Z2 axis, if any, should be the next open extruder port
871
-#if NUM_Z_STEPPER_DRIVERS >= 2
871
+#if NUM_Z_STEPPERS >= 2
872
   #ifndef Z2_STEP_PIN
872
   #ifndef Z2_STEP_PIN
873
     #define Z2_STEP_PIN   _EPIN(Z2_E_INDEX, STEP)
873
     #define Z2_STEP_PIN   _EPIN(Z2_E_INDEX, STEP)
874
     #define Z2_DIR_PIN    _EPIN(Z2_E_INDEX, DIR)
874
     #define Z2_DIR_PIN    _EPIN(Z2_E_INDEX, DIR)
947
   #define Z2_MS3_PIN -1
947
   #define Z2_MS3_PIN -1
948
 #endif
948
 #endif
949
 
949
 
950
-#if NUM_Z_STEPPER_DRIVERS >= 3 && !defined(Z3_DIAG_PIN) && !defined(Z3_STEP_PIN) && !PIN_EXISTS(Z3_CS_PIN)
950
+#if NUM_Z_STEPPERS >= 3 && !defined(Z3_DIAG_PIN) && !defined(Z3_STEP_PIN) && !PIN_EXISTS(Z3_CS_PIN)
951
   #define Z4_E_INDEX INCREMENT(Z3_E_INDEX)
951
   #define Z4_E_INDEX INCREMENT(Z3_E_INDEX)
952
 #else
952
 #else
953
   #define Z4_E_INDEX Z3_E_INDEX
953
   #define Z4_E_INDEX Z3_E_INDEX
954
 #endif
954
 #endif
955
 
955
 
956
 // The Z3 axis, if any, should be the next open extruder port
956
 // The Z3 axis, if any, should be the next open extruder port
957
-#if NUM_Z_STEPPER_DRIVERS >= 3
957
+#if NUM_Z_STEPPERS >= 3
958
   #ifndef Z3_STEP_PIN
958
   #ifndef Z3_STEP_PIN
959
     #define Z3_STEP_PIN   _EPIN(Z3_E_INDEX, STEP)
959
     #define Z3_STEP_PIN   _EPIN(Z3_E_INDEX, STEP)
960
     #define Z3_DIR_PIN    _EPIN(Z3_E_INDEX, DIR)
960
     #define Z3_DIR_PIN    _EPIN(Z3_E_INDEX, DIR)
1033
   #define Z3_MS3_PIN -1
1033
   #define Z3_MS3_PIN -1
1034
 #endif
1034
 #endif
1035
 
1035
 
1036
-#if NUM_Z_STEPPER_DRIVERS >= 4 && !defined(Z4_DIAG_PIN) && !defined(Z4_STEP_PIN) && !PIN_EXISTS(Z4_CS_PIN)
1036
+#if NUM_Z_STEPPERS >= 4 && !defined(Z4_DIAG_PIN) && !defined(Z4_STEP_PIN) && !PIN_EXISTS(Z4_CS_PIN)
1037
   #define I_E_INDEX INCREMENT(Z4_E_INDEX)
1037
   #define I_E_INDEX INCREMENT(Z4_E_INDEX)
1038
 #else
1038
 #else
1039
   #define I_E_INDEX Z4_E_INDEX
1039
   #define I_E_INDEX Z4_E_INDEX
1040
 #endif
1040
 #endif
1041
 
1041
 
1042
 // The Z4 axis, if any, should be the next open extruder port
1042
 // The Z4 axis, if any, should be the next open extruder port
1043
-#if NUM_Z_STEPPER_DRIVERS >= 4
1043
+#if NUM_Z_STEPPERS >= 4
1044
   #ifndef Z4_STEP_PIN
1044
   #ifndef Z4_STEP_PIN
1045
     #define Z4_STEP_PIN   _EPIN(Z4_E_INDEX, STEP)
1045
     #define Z4_STEP_PIN   _EPIN(Z4_E_INDEX, STEP)
1046
     #define Z4_DIR_PIN    _EPIN(Z4_E_INDEX, DIR)
1046
     #define Z4_DIR_PIN    _EPIN(Z4_E_INDEX, DIR)
1747
 #if DISABLED(Z_MULTI_ENDSTOPS) || Z_HOME_TO_MIN
1747
 #if DISABLED(Z_MULTI_ENDSTOPS) || Z_HOME_TO_MIN
1748
   #undef Z2_MAX_PIN
1748
   #undef Z2_MAX_PIN
1749
 #endif
1749
 #endif
1750
-#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 3 || Z_HOME_TO_MAX
1750
+#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPERS < 3 || Z_HOME_TO_MAX
1751
   #undef Z3_MIN_PIN
1751
   #undef Z3_MIN_PIN
1752
 #endif
1752
 #endif
1753
-#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 3 || Z_HOME_TO_MIN
1753
+#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPERS < 3 || Z_HOME_TO_MIN
1754
   #undef Z3_MAX_PIN
1754
   #undef Z3_MAX_PIN
1755
 #endif
1755
 #endif
1756
-#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 4 || Z_HOME_TO_MAX
1756
+#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPERS < 4 || Z_HOME_TO_MAX
1757
   #undef Z4_MIN_PIN
1757
   #undef Z4_MIN_PIN
1758
 #endif
1758
 #endif
1759
-#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 4 || Z_HOME_TO_MIN
1759
+#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPERS < 4 || Z_HOME_TO_MIN
1760
   #undef Z4_MAX_PIN
1760
   #undef Z4_MAX_PIN
1761
 #endif
1761
 #endif
1762
 
1762
 

+ 2
- 2
Marlin/src/pins/ramps/pins_RL200.h View File

31
 
31
 
32
 #if HOTENDS > 2 || E_STEPPERS > 2
32
 #if HOTENDS > 2 || E_STEPPERS > 2
33
   #error "RL200v1 supports up to 2 hotends / E-steppers. Comment out this line to continue."
33
   #error "RL200v1 supports up to 2 hotends / E-steppers. Comment out this line to continue."
34
-#elif NUM_Z_STEPPER_DRIVERS != 2
35
-  #error "RL200 uses dual Z stepper motors. Set NUM_Z_STEPPER_DRIVERS to 2 or comment out this line to continue."
34
+#elif NUM_Z_STEPPERS != 2
35
+  #error "RL200 uses dual Z stepper motors. Set NUM_Z_STEPPERS to 2 or comment out this line to continue."
36
 #elif !(AXIS_DRIVER_TYPE_X(DRV8825) && AXIS_DRIVER_TYPE_Y(DRV8825) && AXIS_DRIVER_TYPE_Z(DRV8825) && AXIS_DRIVER_TYPE_Z2(DRV8825) && AXIS_DRIVER_TYPE_E0(DRV8825))
36
 #elif !(AXIS_DRIVER_TYPE_X(DRV8825) && AXIS_DRIVER_TYPE_Y(DRV8825) && AXIS_DRIVER_TYPE_Z(DRV8825) && AXIS_DRIVER_TYPE_Z2(DRV8825) && AXIS_DRIVER_TYPE_E0(DRV8825))
37
   #error "You must set ([XYZ]|Z2|E0)_DRIVER_TYPE to DRV8825 in Configuration.h for RL200."
37
   #error "You must set ([XYZ]|Z2|E0)_DRIVER_TYPE to DRV8825 in Configuration.h for RL200."
38
 #endif
38
 #endif

+ 1
- 1
Marlin/src/pins/ramps/pins_ZRIB_V53.h View File

118
 #define Z_DIR_PIN                             48
118
 #define Z_DIR_PIN                             48
119
 #define Z_ENABLE_PIN                          62
119
 #define Z_ENABLE_PIN                          62
120
 
120
 
121
-#if NUM_Z_STEPPER_DRIVERS == 2
121
+#if NUM_Z_STEPPERS == 2
122
   #define Z2_STEP_PIN                         26  // E0 connector
122
   #define Z2_STEP_PIN                         26  // E0 connector
123
   #define Z2_DIR_PIN                          28
123
   #define Z2_DIR_PIN                          28
124
   #define Z2_ENABLE_PIN                       24
124
   #define Z2_ENABLE_PIN                       24

+ 1
- 1
Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h View File

110
 // This board have the option to use an extra TMC2209 stepper, one of the use could be as a second extruder.
110
 // This board have the option to use an extra TMC2209 stepper, one of the use could be as a second extruder.
111
 #if EXTRUDERS < 2
111
 #if EXTRUDERS < 2
112
   // TODO: Corregir aquí que cuando tenemos dos extrusores o lo que sea, utiliza los endstop que le sobran, osea los max, no hay Z2_endstop
112
   // TODO: Corregir aquí que cuando tenemos dos extrusores o lo que sea, utiliza los endstop que le sobran, osea los max, no hay Z2_endstop
113
-  #if NUM_Z_STEPPER_DRIVERS > 1
113
+  #if NUM_Z_STEPPERS > 1
114
     #define Z2_STOP_PIN                       14
114
     #define Z2_STOP_PIN                       14
115
   #endif
115
   #endif
116
 #else
116
 #else

+ 4
- 4
Marlin/src/pins/sensitive_pins.h View File

778
   #define _X2_PINS
778
   #define _X2_PINS
779
 #endif
779
 #endif
780
 
780
 
781
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
781
+#if HAS_DUAL_Y_STEPPERS
782
   #if PIN_EXISTS(Y2_CS) && AXIS_HAS_SPI(Y2)
782
   #if PIN_EXISTS(Y2_CS) && AXIS_HAS_SPI(Y2)
783
     #define _Y2_CS Y2_CS_PIN,
783
     #define _Y2_CS Y2_CS_PIN,
784
   #else
784
   #else
804
   #define _Y2_PINS
804
   #define _Y2_PINS
805
 #endif
805
 #endif
806
 
806
 
807
-#if NUM_Z_STEPPER_DRIVERS >= 2
807
+#if NUM_Z_STEPPERS >= 2
808
   #if PIN_EXISTS(Z2_CS) && AXIS_HAS_SPI(Z2)
808
   #if PIN_EXISTS(Z2_CS) && AXIS_HAS_SPI(Z2)
809
     #define _Z2_CS Z2_CS_PIN,
809
     #define _Z2_CS Z2_CS_PIN,
810
   #else
810
   #else
830
   #define _Z2_PINS
830
   #define _Z2_PINS
831
 #endif
831
 #endif
832
 
832
 
833
-#if NUM_Z_STEPPER_DRIVERS >= 3
833
+#if NUM_Z_STEPPERS >= 3
834
   #if PIN_EXISTS(Z3_CS) && AXIS_HAS_SPI(Z3)
834
   #if PIN_EXISTS(Z3_CS) && AXIS_HAS_SPI(Z3)
835
     #define _Z3_CS Z3_CS_PIN,
835
     #define _Z3_CS Z3_CS_PIN,
836
   #else
836
   #else
856
   #define _Z3_PINS
856
   #define _Z3_PINS
857
 #endif
857
 #endif
858
 
858
 
859
-#if NUM_Z_STEPPER_DRIVERS >= 4
859
+#if NUM_Z_STEPPERS >= 4
860
   #if PIN_EXISTS(Z4_CS) && AXIS_HAS_SPI(Z4)
860
   #if PIN_EXISTS(Z4_CS) && AXIS_HAS_SPI(Z4)
861
     #define _Z4_CS Z4_CS_PIN,
861
     #define _Z4_CS Z4_CS_PIN,
862
   #else
862
   #else

+ 1
- 1
buildroot/tests/BIGTREE_GTR_V1_0 View File

22
 restore_configs
22
 restore_configs
23
 opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \
23
 opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \
24
         EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 \
24
         EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 \
25
-        NUM_Z_STEPPER_DRIVERS 4 \
25
+        Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z3_DRIVER_TYPE A4988 Z4_DRIVER_TYPE A4988 \
26
         DEFAULT_Kp_LIST '{ 22.2, 20.0, 21.0, 19.0, 18.0 }' DEFAULT_Ki_LIST '{ 1.08 }' DEFAULT_Kd_LIST '{ 114.0, 112.0, 110.0, 108.0 }'
26
         DEFAULT_Kp_LIST '{ 22.2, 20.0, 21.0, 19.0, 18.0 }' DEFAULT_Ki_LIST '{ 1.08 }' DEFAULT_Kd_LIST '{ 114.0, 112.0, 110.0, 108.0 }'
27
 opt_enable TOOLCHANGE_FILAMENT_SWAP TOOLCHANGE_MIGRATION_FEATURE TOOLCHANGE_FS_SLOW_FIRST_PRIME TOOLCHANGE_FS_PRIME_FIRST_USED \
27
 opt_enable TOOLCHANGE_FILAMENT_SWAP TOOLCHANGE_MIGRATION_FEATURE TOOLCHANGE_FS_SLOW_FIRST_PRIME TOOLCHANGE_FS_PRIME_FIRST_USED \
28
            PID_PARAMS_PER_HOTEND Z_MULTI_ENDSTOPS
28
            PID_PARAMS_PER_HOTEND Z_MULTI_ENDSTOPS

+ 1
- 1
buildroot/tests/DUE View File

35
 # RADDS with BLTouch, ABL(B), 3 x Z auto-align
35
 # RADDS with BLTouch, ABL(B), 3 x Z auto-align
36
 #
36
 #
37
 restore_configs
37
 restore_configs
38
-opt_set MOTHERBOARD BOARD_RADDS NUM_Z_STEPPER_DRIVERS 3
38
+opt_set MOTHERBOARD BOARD_RADDS Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z3_DRIVER_TYPE A4988
39
 opt_enable USE_XMAX_PLUG USE_YMAX_PLUG ENDSTOPPULLUPS BLTOUCH AUTO_BED_LEVELING_BILINEAR \
39
 opt_enable USE_XMAX_PLUG USE_YMAX_PLUG ENDSTOPPULLUPS BLTOUCH AUTO_BED_LEVELING_BILINEAR \
40
            Z_STEPPER_AUTO_ALIGN Z_STEPPER_ALIGN_STEPPER_XY Z_SAFE_HOMING
40
            Z_STEPPER_AUTO_ALIGN Z_STEPPER_ALIGN_STEPPER_XY Z_SAFE_HOMING
41
 pins_set ramps/RAMPS X_MAX_PIN -1
41
 pins_set ramps/RAMPS X_MAX_PIN -1

+ 0
- 1
buildroot/tests/SAMD51_grandcentral_m4 View File

16
         RESTORE_LEVELING_AFTER_G28 false \
16
         RESTORE_LEVELING_AFTER_G28 false \
17
         LCD_LANGUAGE it \
17
         LCD_LANGUAGE it \
18
         SDCARD_CONNECTION LCD \
18
         SDCARD_CONNECTION LCD \
19
-        NUM_Z_STEPPER_DRIVERS 2 \
20
         HOMING_BUMP_MM '{ 0, 0, 0 }'
19
         HOMING_BUMP_MM '{ 0, 0, 0 }'
21
 opt_enable ENDSTOP_INTERRUPTS_FEATURE S_CURVE_ACCELERATION BLTOUCH Z_MIN_PROBE_REPEATABILITY_TEST \
20
 opt_enable ENDSTOP_INTERRUPTS_FEATURE S_CURVE_ACCELERATION BLTOUCH Z_MIN_PROBE_REPEATABILITY_TEST \
22
            FILAMENT_RUNOUT_SENSOR G26_MESH_VALIDATION MESH_EDIT_GFX_OVERLAY Z_SAFE_HOMING \
21
            FILAMENT_RUNOUT_SENSOR G26_MESH_VALIDATION MESH_EDIT_GFX_OVERLAY Z_SAFE_HOMING \

+ 1
- 1
buildroot/tests/mega1280 View File

39
 restore_configs
39
 restore_configs
40
 opt_set MOTHERBOARD BOARD_ZRIB_V52 \
40
 opt_set MOTHERBOARD BOARD_ZRIB_V52 \
41
         LCD_LANGUAGE pt REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 \
41
         LCD_LANGUAGE pt REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 \
42
-        EXTRUDERS 2 TEMP_SENSOR_1 1
42
+        EXTRUDERS 2 TEMP_SENSOR_1 1 X2_DRIVER_TYPE A4988
43
 opt_enable USE_XMAX_PLUG DUAL_X_CARRIAGE REPRAPWORLD_KEYPAD
43
 opt_enable USE_XMAX_PLUG DUAL_X_CARRIAGE REPRAPWORLD_KEYPAD
44
 exec_test $1 $2 "ZRIB_V52 | DUAL_X_CARRIAGE" "$3"
44
 exec_test $1 $2 "ZRIB_V52 | DUAL_X_CARRIAGE" "$3"
45
 
45
 

+ 3
- 2
buildroot/tests/rambo View File

51
         DEFAULT_MAX_ACCELERATION '{ 3000, 3000, 100 }' \
51
         DEFAULT_MAX_ACCELERATION '{ 3000, 3000, 100 }' \
52
         MANUAL_FEEDRATE '{ 50*60, 50*60, 4*60 }' \
52
         MANUAL_FEEDRATE '{ 50*60, 50*60, 4*60 }' \
53
         AXIS_RELATIVE_MODES '{ false, false, false }' \
53
         AXIS_RELATIVE_MODES '{ false, false, false }' \
54
-        LEVEL_CORNERS_LEVELING_ORDER '{ LF, RF }'
54
+        LEVEL_CORNERS_LEVELING_ORDER '{ LF, RF }' \
55
+        X2_DRIVER_TYPE A4988 Y2_DRIVER_TYPE A4988
55
 opt_enable USE_XMAX_PLUG USE_YMAX_PLUG USE_ZMAX_PLUG \
56
 opt_enable USE_XMAX_PLUG USE_YMAX_PLUG USE_ZMAX_PLUG \
56
            REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER REVERSE_ENCODER_DIRECTION SDSUPPORT EEPROM_SETTINGS \
57
            REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER REVERSE_ENCODER_DIRECTION SDSUPPORT EEPROM_SETTINGS \
57
-           S_CURVE_ACCELERATION X_DUAL_STEPPER_DRIVERS X_DUAL_ENDSTOPS Y_DUAL_STEPPER_DRIVERS Y_DUAL_ENDSTOPS \
58
+           S_CURVE_ACCELERATION X_DUAL_ENDSTOPS Y_DUAL_ENDSTOPS \
58
            ADAPTIVE_STEP_SMOOTHING CNC_COORDINATE_SYSTEMS GCODE_MOTION_MODES \
59
            ADAPTIVE_STEP_SMOOTHING CNC_COORDINATE_SYSTEMS GCODE_MOTION_MODES \
59
            LEVEL_BED_CORNERS LEVEL_CENTER_TOO
60
            LEVEL_BED_CORNERS LEVEL_CENTER_TOO
60
 opt_disable MIN_SOFTWARE_ENDSTOP_Z MAX_SOFTWARE_ENDSTOPS
61
 opt_disable MIN_SOFTWARE_ENDSTOP_Z MAX_SOFTWARE_ENDSTOPS

+ 1
- 1
buildroot/tests/teensy35 View File

101
 # Enable Dual Z with Dual Z endstops
101
 # Enable Dual Z with Dual Z endstops
102
 #
102
 #
103
 restore_configs
103
 restore_configs
104
-opt_set MOTHERBOARD BOARD_TEENSY35_36 NUM_Z_STEPPER_DRIVERS 2 Z2_MIN_PIN 2
104
+opt_set MOTHERBOARD BOARD_TEENSY35_36 Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z2_MIN_PIN 2
105
 opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG
105
 opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG
106
 pins_set ramps/RAMPS X_MAX_PIN -1
106
 pins_set ramps/RAMPS X_MAX_PIN -1
107
 exec_test $1 $2 "Dual Z with Dual Z endstops" "$3"
107
 exec_test $1 $2 "Dual Z with Dual Z endstops" "$3"

+ 1
- 1
buildroot/tests/teensy41 View File

105
 # Enable Dual Z with Dual Z endstops
105
 # Enable Dual Z with Dual Z endstops
106
 #
106
 #
107
 restore_configs
107
 restore_configs
108
-opt_set MOTHERBOARD BOARD_TEENSY41 NUM_Z_STEPPER_DRIVERS 2 Z2_MIN_PIN 2
108
+opt_set MOTHERBOARD BOARD_TEENSY41 Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z2_MIN_PIN 2
109
 opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG
109
 opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG
110
 pins_set ramps/RAMPS X_MAX_PIN -1
110
 pins_set ramps/RAMPS X_MAX_PIN -1
111
 exec_test $1 $2 "Dual Z with Dual Z endstops" "$3"
111
 exec_test $1 $2 "Dual Z with Dual Z endstops" "$3"

Loading…
Cancel
Save