Просмотр исходного кода

♻️ Stepper options refactor (#25422)

Scott Lahteine 2 лет назад
Родитель
Сommit
f9f6662a8c

+ 9 - 9
Marlin/Configuration.h

@@ -1673,15 +1673,15 @@
 
 // Disable axis steppers immediately when they're not being stepped.
 // WARNING: When motors turn off there is a chance of losing position accuracy!
-#define DISABLE_X false
-#define DISABLE_Y false
-#define DISABLE_Z false
-//#define DISABLE_I false
-//#define DISABLE_J false
-//#define DISABLE_K false
-//#define DISABLE_U false
-//#define DISABLE_V false
-//#define DISABLE_W false
+//#define DISABLE_X
+//#define DISABLE_Y
+//#define DISABLE_Z
+//#define DISABLE_I
+//#define DISABLE_J
+//#define DISABLE_K
+//#define DISABLE_U
+//#define DISABLE_V
+//#define DISABLE_W
 
 // Turn off the display blinking that warns about possible accuracy reduction
 //#define DISABLE_REDUCED_ACCURACY_WARNING

+ 20 - 21
Marlin/Configuration_adv.h

@@ -1104,17 +1104,17 @@
 // Add a Duplicate option for well-separated conjoined nozzles
 //#define MULTI_NOZZLE_DUPLICATION
 
-// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
-#define INVERT_X_STEP_PIN false
-#define INVERT_Y_STEP_PIN false
-#define INVERT_Z_STEP_PIN false
-#define INVERT_I_STEP_PIN false
-#define INVERT_J_STEP_PIN false
-#define INVERT_K_STEP_PIN false
-#define INVERT_U_STEP_PIN false
-#define INVERT_V_STEP_PIN false
-#define INVERT_W_STEP_PIN false
-#define INVERT_E_STEP_PIN false
+// By default stepper drivers require an active-HIGH signal but some high-power drivers require an active-LOW signal to step.
+#define STEP_STATE_X HIGH
+#define STEP_STATE_Y HIGH
+#define STEP_STATE_Z HIGH
+#define STEP_STATE_I HIGH
+#define STEP_STATE_J HIGH
+#define STEP_STATE_K HIGH
+#define STEP_STATE_U HIGH
+#define STEP_STATE_V HIGH
+#define STEP_STATE_W HIGH
+#define STEP_STATE_E HIGH
 
 /**
  * Idle Stepper Shutdown
@@ -1122,16 +1122,15 @@
  * The Deactive Time can be overridden with M18 and M84. Set to 0 for No Timeout.
  */
 #define DEFAULT_STEPPER_DEACTIVE_TIME 120
-#define DISABLE_INACTIVE_X true
-#define DISABLE_INACTIVE_Y true
-#define DISABLE_INACTIVE_Z true  // Set 'false' if the nozzle could fall onto your printed part!
-#define DISABLE_INACTIVE_I true
-#define DISABLE_INACTIVE_J true
-#define DISABLE_INACTIVE_K true
-#define DISABLE_INACTIVE_U true
-#define DISABLE_INACTIVE_V true
-#define DISABLE_INACTIVE_W true
-#define DISABLE_INACTIVE_E true
+#define DISABLE_INACTIVE_X
+#define DISABLE_INACTIVE_Y
+#define DISABLE_INACTIVE_Z  // Disable if the nozzle could fall onto your printed part!
+//#define DISABLE_INACTIVE_I
+//#define DISABLE_INACTIVE_J
+//#define DISABLE_INACTIVE_K
+//#define DISABLE_INACTIVE_U
+//#define DISABLE_INACTIVE_V
+//#define DISABLE_INACTIVE_W
 
 // Default Minimum Feedrates for printing and travel moves
 #define DEFAULT_MINIMUMFEEDRATE       0.0     // (mm/s. °/s for rotational-only moves) Minimum feedrate. Set with M205 S.

+ 1 - 1
Marlin/src/MarlinCore.cpp

@@ -448,7 +448,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
           TERN_(DISABLE_INACTIVE_U, stepper.disable_axis(U_AXIS));
           TERN_(DISABLE_INACTIVE_V, stepper.disable_axis(V_AXIS));
           TERN_(DISABLE_INACTIVE_W, stepper.disable_axis(W_AXIS));
-          TERN_(DISABLE_INACTIVE_E, stepper.disable_e_steppers());
+          TERN_(DISABLE_INACTIVE_EXTRUDER, stepper.disable_e_steppers());
 
           TERN_(AUTO_BED_LEVELING_UBL, bedlevel.steppers_were_disabled());
         }

+ 21 - 21
Marlin/src/core/types.h

@@ -44,7 +44,7 @@ struct IF<true, L, R> { typedef L type; };
 #define NUM_AXIS_LIST_1(V)  LIST_N_1(NUM_AXES, V)
 #define NUM_AXIS_ARRAY(V...) { NUM_AXIS_LIST(V) }
 #define NUM_AXIS_ARRAY_1(V)  { NUM_AXIS_LIST_1(V) }
-#define NUM_AXIS_ARGS(T...) NUM_AXIS_LIST(T x, T y, T z, T i, T j, T k, T u, T v, T w)
+#define NUM_AXIS_ARGS(T)    NUM_AXIS_LIST(T x, T y, T z, T i, T j, T k, T u, T v, T w)
 #define NUM_AXIS_ELEM(O)    NUM_AXIS_LIST(O.x, O.y, O.z, O.i, O.j, O.k, O.u, O.v, O.w)
 #define NUM_AXIS_DEFS(T,V)  NUM_AXIS_LIST(T x=V, T y=V, T z=V, T i=V, T j=V, T k=V, T u=V, T v=V, T w=V)
 #define MAIN_AXIS_NAMES     NUM_AXIS_LIST(X, Y, Z, I, J, K, U, V, W)
@@ -57,7 +57,7 @@ struct IF<true, L, R> { typedef L type; };
 #define LOGICAL_AXIS_LIST_1(V)    NUM_AXIS_LIST_1(V) LIST_ITEM_E(V)
 #define LOGICAL_AXIS_ARRAY(E,V...) { LOGICAL_AXIS_LIST(E,V) }
 #define LOGICAL_AXIS_ARRAY_1(V)    { LOGICAL_AXIS_LIST_1(V) }
-#define LOGICAL_AXIS_ARGS(T...) LOGICAL_AXIS_LIST(T e, T x, T y, T z, T i, T j, T k, T u, T v, T w)
+#define LOGICAL_AXIS_ARGS(T)    LOGICAL_AXIS_LIST(T e, T x, T y, T z, T i, T j, T k, T u, T v, T w)
 #define LOGICAL_AXIS_ELEM(O)    LOGICAL_AXIS_LIST(O.e, O.x, O.y, O.z, O.i, O.j, O.k, O.u, O.v, O.w)
 #define LOGICAL_AXIS_DECL(T,V)  LOGICAL_AXIS_LIST(T e=V, T x=V, T y=V, T z=V, T i=V, T j=V, T k=V, T u=V, T v=V, T w=V)
 #define LOGICAL_AXIS_NAMES      LOGICAL_AXIS_LIST(E, X, Y, Z, I, J, K, U, V, W)
@@ -96,14 +96,14 @@ struct Flags {
     bits_t b;
     typename IF<(N>8), N16, N8>::type flag;
   };
-  void reset()                             { b = 0; }
-  void set(const int n, const bool onoff)  { onoff ? set(n) : clear(n); }
-  void set(const int n)                    { b |=  (bits_t)_BV(n); }
-  void clear(const int n)                  { b &= ~(bits_t)_BV(n); }
-  bool test(const int n) const             { return TEST(b, n); }
-  bool operator[](const int n)             { return test(n); }
-  bool operator[](const int n) const       { return test(n); }
-  int size() const                         { return sizeof(b); }
+  void reset()                            { b = 0; }
+  void set(const int n, const bool onoff) { onoff ? set(n) : clear(n); }
+  void set(const int n)                   { b |=  (bits_t)_BV(n); }
+  void clear(const int n)                 { b &= ~(bits_t)_BV(n); }
+  bool test(const int n) const            { return TEST(b, n); }
+  bool operator[](const int n)            { return test(n); }
+  bool operator[](const int n) const      { return test(n); }
+  int size() const                        { return sizeof(b); }
 };
 
 // Specialization for a single bool flag
@@ -129,14 +129,14 @@ typedef struct AxisFlags {
     struct Flags<LOGICAL_AXES> flags;
     struct { bool LOGICAL_AXIS_LIST(e:1, x:1, y:1, z:1, i:1, j:1, k:1, u:1, v:1, w:1); };
   };
-  void reset()                             { flags.reset(); }
-  void set(const int n)                    { flags.set(n); }
-  void set(const int n, const bool onoff)  { flags.set(n, onoff); }
-  void clear(const int n)                  { flags.clear(n); }
-  bool test(const int n) const             { return flags.test(n); }
-  bool operator[](const int n)             { return flags[n]; }
-  bool operator[](const int n) const       { return flags[n]; }
-  int size() const                         { return sizeof(flags); }
+  void reset()                            { flags.reset(); }
+  void set(const int n)                   { flags.set(n); }
+  void set(const int n, const bool onoff) { flags.set(n, onoff); }
+  void clear(const int n)                 { flags.clear(n); }
+  bool test(const int n) const            { return flags.test(n); }
+  bool operator[](const int n)            { return flags[n]; }
+  bool operator[](const int n) const      { return flags[n]; }
+  int size() const                        { return sizeof(flags); }
 } axis_flags_t;
 
 //
@@ -188,9 +188,9 @@ typedef IF<(NUM_AXIS_ENUMS > 8), uint16_t, uint8_t>::type axis_bits_t;
 // Loop over axes
 //
 #define LOOP_ABC(VAR) LOOP_S_LE_N(VAR, A_AXIS, C_AXIS)
-#define LOOP_NUM_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, NUM_AXES)
-#define LOOP_LOGICAL_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, LOGICAL_AXES)
-#define LOOP_DISTINCT_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, DISTINCT_AXES)
+#define LOOP_NUM_AXES(VAR) LOOP_S_L_N(VAR, 0, NUM_AXES)
+#define LOOP_LOGICAL_AXES(VAR) LOOP_S_L_N(VAR, 0, LOGICAL_AXES)
+#define LOOP_DISTINCT_AXES(VAR) LOOP_S_L_N(VAR, 0, DISTINCT_AXES)
 #define LOOP_DISTINCT_E(VAR) LOOP_L_N(VAR, DISTINCT_E)
 
 //

+ 1 - 1
Marlin/src/gcode/calibrate/G28.cpp

@@ -86,7 +86,7 @@
         NUM_AXIS_LIST(
           TERN0(X_SENSORLESS, tmc_enable_stallguard(stepperX)),
           TERN0(Y_SENSORLESS, tmc_enable_stallguard(stepperY)),
-          false, false, false, false
+          false, false, false, false, false, false, false
         )
         , TERN0(X2_SENSORLESS, tmc_enable_stallguard(stepperX2))
         , TERN0(Y2_SENSORLESS, tmc_enable_stallguard(stepperY2))

+ 1 - 3
Marlin/src/gcode/geometry/M206_M428.cpp

@@ -33,9 +33,7 @@
 /**
  * M206: Set Additional Homing Offset (X Y Z). SCARA aliases T=X, P=Y
  *
- * *** @thinkyhead: I recommend deprecating M206 for SCARA in favor of M665.
- * ***              M206 for SCARA will remain enabled in 1.1.x for compatibility.
- * ***              In the 2.0 release, it will simply be disabled by default.
+ * *** TODO: Deprecate M206 for SCARA in favor of M665.
  */
 void GcodeSuite::M206() {
   if (!parser.seen_any()) return M206_report();

+ 34 - 31
Marlin/src/inc/Conditionals_LCD.h

@@ -758,39 +758,31 @@
 #define HAS_X_AXIS 1
 #if NUM_AXES >= XY
   #define HAS_Y_AXIS 1
-  #if NUM_AXES >= XYZ
-    #define HAS_Z_AXIS 1
-    #ifdef Z4_DRIVER_TYPE
-      #define NUM_Z_STEPPERS 4
-    #elif defined(Z3_DRIVER_TYPE)
-      #define NUM_Z_STEPPERS 3
-    #elif defined(Z2_DRIVER_TYPE)
-      #define NUM_Z_STEPPERS 2
-    #else
-      #define NUM_Z_STEPPERS 1
-    #endif
-    #if NUM_AXES >= 4
-      #define HAS_I_AXIS 1
-      #if NUM_AXES >= 5
-        #define HAS_J_AXIS 1
-        #if NUM_AXES >= 6
-          #define HAS_K_AXIS 1
-          #if NUM_AXES >= 7
-            #define HAS_U_AXIS 1
-            #if NUM_AXES >= 8
-              #define HAS_V_AXIS 1
-              #if NUM_AXES >= 9
-                #define HAS_W_AXIS 1
-              #endif
-            #endif
-          #endif
-        #endif
-      #endif
-    #endif
-  #endif
+#endif
+#if NUM_AXES >= XYZ
+  #define HAS_Z_AXIS 1
+#endif
+#if NUM_AXES >= 4
+  #define HAS_I_AXIS 1
+#endif
+#if NUM_AXES >= 5
+  #define HAS_J_AXIS 1
+#endif
+#if NUM_AXES >= 6
+  #define HAS_K_AXIS 1
+#endif
+#if NUM_AXES >= 7
+  #define HAS_U_AXIS 1
+#endif
+#if NUM_AXES >= 8
+  #define HAS_V_AXIS 1
+#endif
+#if NUM_AXES >= 9
+  #define HAS_W_AXIS 1
 #endif
 
 #if !HAS_Y_AXIS
+  #undef AVOID_OBSTACLES
   #undef ENDSTOPPULLUP_YMIN
   #undef ENDSTOPPULLUP_YMAX
   #undef Y_MIN_ENDSTOP_INVERTING
@@ -807,7 +799,17 @@
   #undef MAX_SOFTWARE_ENDSTOP_Y
 #endif
 
-#if !HAS_Z_AXIS
+#if HAS_Z_AXIS
+  #ifdef Z4_DRIVER_TYPE
+    #define NUM_Z_STEPPERS 4
+  #elif defined(Z3_DRIVER_TYPE)
+    #define NUM_Z_STEPPERS 3
+  #elif defined(Z2_DRIVER_TYPE)
+    #define NUM_Z_STEPPERS 2
+  #else
+    #define NUM_Z_STEPPERS 1
+  #endif
+#else
   #undef ENDSTOPPULLUP_ZMIN
   #undef ENDSTOPPULLUP_ZMAX
   #undef Z_MIN_ENDSTOP_INVERTING
@@ -822,6 +824,7 @@
   #undef Z_MIN_POS
   #undef Z_MAX_POS
   #undef MANUAL_Z_HOME_POS
+  #undef Z_SAFE_HOMING
   #undef MIN_SOFTWARE_ENDSTOP_Z
   #undef MAX_SOFTWARE_ENDSTOP_Z
 #endif

+ 68 - 62
Marlin/src/inc/Conditionals_adv.h

@@ -88,51 +88,108 @@
 
 // Some options are disallowed without required axes
 #if !HAS_Y_AXIS
-  #undef SAFE_BED_LEVELING_START_Y
   #undef ARC_SUPPORT
+  #undef CALIBRATION_MEASURE_YMAX
+  #undef CALIBRATION_MEASURE_YMIN
+  #undef DISABLE_INACTIVE_Y
+  #undef HOME_Y_BEFORE_X
   #undef INPUT_SHAPING_Y
-  #undef SHAPING_FREQ_Y
+  #undef QUICK_HOME
+  #undef SAFE_BED_LEVELING_START_Y
   #undef SHAPING_BUFFER_Y
+  #undef SHAPING_FREQ_Y
+  #undef STEALTHCHOP_Y
+  #undef STEP_STATE_Y
 #endif
+
 #if !HAS_Z_AXIS
+  #undef CALIBRATION_MEASURE_ZMAX
+  #undef CALIBRATION_MEASURE_ZMIN
+  #undef CNC_WORKSPACE_PLANES
+  #undef DISABLE_INACTIVE_Z
+  #undef ENABLE_LEVELING_FADE_HEIGHT
+  #undef HOME_Z_FIRST
+  #undef HOMING_Z_WITH_PROBE
+  #undef NUM_Z_STEPPERS
   #undef SAFE_BED_LEVELING_START_Z
+  #undef STEALTHCHOP_Z
+  #undef STEP_STATE_Z
+  #undef Z_IDLE_HEIGHT
+  #undef Z_PROBE_SLED
+  #undef Z_SAFE_HOMING
 #endif
+
 #if !HAS_I_AXIS
+  #undef CALIBRATION_MEASURE_IMAX
+  #undef CALIBRATION_MEASURE_IMIN
+  #undef DISABLE_INACTIVE_I
   #undef SAFE_BED_LEVELING_START_I
+  #undef STEALTHCHOP_I
+  #undef STEP_STATE_I
 #endif
+
 #if !HAS_J_AXIS
+  #undef CALIBRATION_MEASURE_JMAX
+  #undef CALIBRATION_MEASURE_JMIN
+  #undef DISABLE_INACTIVE_J
   #undef SAFE_BED_LEVELING_START_J
+  #undef STEALTHCHOP_J
+  #undef STEP_STATE_J
 #endif
+
 #if !HAS_K_AXIS
+  #undef CALIBRATION_MEASURE_KMAX
+  #undef CALIBRATION_MEASURE_KMIN
+  #undef DISABLE_INACTIVE_K
   #undef SAFE_BED_LEVELING_START_K
+  #undef STEALTHCHOP_K
+  #undef STEP_STATE_K
 #endif
+
 #if !HAS_U_AXIS
+  #undef CALIBRATION_MEASURE_UMAX
+  #undef CALIBRATION_MEASURE_UMIN
+  #undef DISABLE_INACTIVE_U
   #undef SAFE_BED_LEVELING_START_U
+  #undef STEALTHCHOP_U
+  #undef STEP_STATE_U
 #endif
+
 #if !HAS_V_AXIS
+  #undef CALIBRATION_MEASURE_VMAX
+  #undef CALIBRATION_MEASURE_VMIN
+  #undef DISABLE_INACTIVE_V
   #undef SAFE_BED_LEVELING_START_V
+  #undef STEALTHCHOP_V
+  #undef STEP_STATE_V
 #endif
+
 #if !HAS_W_AXIS
+  #undef CALIBRATION_MEASURE_WMAX
+  #undef CALIBRATION_MEASURE_WMIN
+  #undef DISABLE_INACTIVE_W
   #undef SAFE_BED_LEVELING_START_W
+  #undef STEALTHCHOP_W
+  #undef STEP_STATE_W
 #endif
 
 // Disallowed with no extruders
 #if !HAS_EXTRUDERS
   #define NO_VOLUMETRICS
-  #undef FWRETRACT
-  #undef PIDTEMP
-  #undef AUTOTEMP
-  #undef PID_EXTRUSION_SCALING
-  #undef LIN_ADVANCE
   #undef ADVANCED_PAUSE_FEATURE
-  #undef FILAMENT_LOAD_UNLOAD_GCODES
+  #undef AUTOTEMP
   #undef EXTRUDER_RUNOUT_PREVENT
-  #undef THERMAL_PROTECTION_PERIOD
-  #undef WATCH_TEMP_PERIOD
-  #undef SHOW_TEMP_ADC_VALUES
+  #undef FILAMENT_LOAD_UNLOAD_GCODES
+  #undef FWRETRACT
   #undef LCD_SHOW_E_TOTAL
+  #undef LIN_ADVANCE
   #undef MANUAL_E_MOVES_RELATIVE
+  #undef PID_EXTRUSION_SCALING
+  #undef PIDTEMP
+  #undef SHOW_TEMP_ADC_VALUES
   #undef STEALTHCHOP_E
+  #undef THERMAL_PROTECTION_PERIOD
+  #undef WATCH_TEMP_PERIOD
 #endif
 
 #if HOTENDS <= 7
@@ -1043,53 +1100,6 @@
   #endif
 #endif
 
-// Remove unused STEALTHCHOP flags
-#if NUM_AXES < 9
-  #undef STEALTHCHOP_W
-  #undef CALIBRATION_MEASURE_WMIN
-  #undef CALIBRATION_MEASURE_WMAX
-  #if NUM_AXES < 8
-    #undef STEALTHCHOP_V
-    #undef CALIBRATION_MEASURE_VMIN
-    #undef CALIBRATION_MEASURE_VMAX
-    #if NUM_AXES < 7
-      #undef STEALTHCHOP_U
-      #undef CALIBRATION_MEASURE_UMIN
-      #undef CALIBRATION_MEASURE_UMAX
-      #if NUM_AXES < 6
-        #undef STEALTHCHOP_K
-        #undef CALIBRATION_MEASURE_KMIN
-        #undef CALIBRATION_MEASURE_KMAX
-        #if NUM_AXES < 5
-          #undef STEALTHCHOP_J
-          #undef CALIBRATION_MEASURE_JMIN
-          #undef CALIBRATION_MEASURE_JMAX
-          #if NUM_AXES < 4
-            #undef STEALTHCHOP_I
-            #undef CALIBRATION_MEASURE_IMIN
-            #undef CALIBRATION_MEASURE_IMAX
-            #if NUM_AXES < 3
-              #undef STEALTHCHOP_Z
-              #undef Z_IDLE_HEIGHT
-              #undef Z_PROBE_SLED
-              #undef Z_SAFE_HOMING
-              #undef HOME_Z_FIRST
-              #undef HOMING_Z_WITH_PROBE
-              #undef ENABLE_LEVELING_FADE_HEIGHT
-              #undef NUM_Z_STEPPERS
-              #undef CNC_WORKSPACE_PLANES
-              #if NUM_AXES < 2
-                #undef STEALTHCHOP_Y
-                #undef QUICK_HOME
-              #endif
-            #endif
-          #endif
-        #endif
-      #endif
-    #endif
-  #endif
-#endif
-
 #if    defined(SAFE_BED_LEVELING_START_X) || defined(SAFE_BED_LEVELING_START_Y) || defined(SAFE_BED_LEVELING_START_Z) \
     || defined(SAFE_BED_LEVELING_START_I) || defined(SAFE_BED_LEVELING_START_J) || defined(SAFE_BED_LEVELING_START_K) \
     || defined(SAFE_BED_LEVELING_START_U) || defined(SAFE_BED_LEVELING_START_V) || defined(SAFE_BED_LEVELING_START_W)
@@ -1185,10 +1195,6 @@
   #define CANNOT_EMBED_CONFIGURATION defined(__AVR__)
 #endif
 
-#if ANY(DISABLE_INACTIVE_X, DISABLE_INACTIVE_Y, DISABLE_INACTIVE_Z, DISABLE_INACTIVE_I, DISABLE_INACTIVE_J, DISABLE_INACTIVE_K, DISABLE_INACTIVE_U, DISABLE_INACTIVE_V, DISABLE_INACTIVE_W, DISABLE_INACTIVE_E)
-  #define HAS_DISABLE_INACTIVE_AXIS 1
-#endif
-
 // Fan Kickstart
 #if FAN_KICKSTART_TIME && !defined(FAN_KICKSTART_POWER)
   #define FAN_KICKSTART_POWER 180

+ 37 - 48
Marlin/src/inc/Conditionals_post.h

@@ -1308,9 +1308,6 @@
 /**
  * Set defaults for missing (newer) options
  */
-#if !defined(DISABLE_INACTIVE_X) && ENABLED(DISABLE_X)
-  #define DISABLE_INACTIVE_X 1
-#endif
 
 #if HAS_Y_AXIS
   #if PIN_EXISTS(Y_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y))
@@ -1338,11 +1335,6 @@
   #if PIN_EXISTS(Y2_MS1)
     #define HAS_Y2_MS_PINS 1
   #endif
-  #if !defined(DISABLE_INACTIVE_Y) && ENABLED(DISABLE_Y)
-    #define DISABLE_INACTIVE_Y 1
-  #endif
-#else
-  #undef DISABLE_INACTIVE_Y
 #endif
 
 #if HAS_Z_AXIS
@@ -1358,11 +1350,6 @@
   #if PIN_EXISTS(Z_MS1)
     #define HAS_Z_MS_PINS 1
   #endif
-  #if !defined(DISABLE_INACTIVE_Z) && ENABLED(DISABLE_Z)
-    #define DISABLE_INACTIVE_Z 1
-  #endif
-#else
-  #undef DISABLE_INACTIVE_Z
 #endif
 
 #if NUM_Z_STEPPERS >= 2
@@ -1423,11 +1410,6 @@
   #if PIN_EXISTS(I_MS1)
     #define HAS_I_MS_PINS 1
   #endif
-  #if !defined(DISABLE_INACTIVE_I) && ENABLED(DISABLE_I)
-    #define DISABLE_INACTIVE_I 1
-  #endif
-#else
-  #undef DISABLE_INACTIVE_I
 #endif
 
 #if HAS_J_AXIS
@@ -1443,11 +1425,6 @@
   #if PIN_EXISTS(J_MS1)
     #define HAS_J_MS_PINS 1
   #endif
-  #if !defined(DISABLE_INACTIVE_J) && ENABLED(DISABLE_J)
-    #define DISABLE_INACTIVE_J 1
-  #endif
-#else
-  #undef DISABLE_INACTIVE_J
 #endif
 
 #if HAS_K_AXIS
@@ -1463,11 +1440,6 @@
   #if PIN_EXISTS(K_MS1)
     #define HAS_K_MS_PINS 1
   #endif
-  #if !defined(DISABLE_INACTIVE_K) && ENABLED(DISABLE_K)
-    #define DISABLE_INACTIVE_K 1
-  #endif
-#else
-  #undef DISABLE_INACTIVE_K
 #endif
 
 #if HAS_U_AXIS
@@ -1483,11 +1455,6 @@
   #if PIN_EXISTS(U_MS1)
     #define HAS_U_MS_PINS 1
   #endif
-  #if !defined(DISABLE_INACTIVE_U) && ENABLED(DISABLE_U)
-    #define DISABLE_INACTIVE_U 1
-  #endif
-#else
-  #undef DISABLE_INACTIVE_U
 #endif
 
 #if HAS_V_AXIS
@@ -1503,11 +1470,6 @@
   #if PIN_EXISTS(V_MS1)
     #define HAS_V_MS_PINS 1
   #endif
-  #if !defined(DISABLE_INACTIVE_V) && ENABLED(DISABLE_V)
-    #define DISABLE_INACTIVE_V 1
-  #endif
-#else
-  #undef DISABLE_INACTIVE_V
 #endif
 
 #if HAS_W_AXIS
@@ -1523,11 +1485,43 @@
   #if PIN_EXISTS(W_MS1)
     #define HAS_W_MS_PINS 1
   #endif
-  #if !defined(DISABLE_INACTIVE_W) && ENABLED(DISABLE_W)
-    #define DISABLE_INACTIVE_W 1
-  #endif
-#else
-  #undef DISABLE_INACTIVE_W
+#endif
+
+#if !defined(DISABLE_INACTIVE_X) && ENABLED(DISABLE_X)
+  #define DISABLE_INACTIVE_X
+#endif
+#if !defined(DISABLE_INACTIVE_Y) && ENABLED(DISABLE_Y)
+  #define DISABLE_INACTIVE_Y
+#endif
+#if !defined(DISABLE_INACTIVE_Z) && ENABLED(DISABLE_Z)
+  #define DISABLE_INACTIVE_Z
+#endif
+#if !defined(DISABLE_INACTIVE_I) && ENABLED(DISABLE_I)
+  #define DISABLE_INACTIVE_I
+#endif
+#if !defined(DISABLE_INACTIVE_J) && ENABLED(DISABLE_J)
+  #define DISABLE_INACTIVE_J
+#endif
+#if !defined(DISABLE_INACTIVE_K) && ENABLED(DISABLE_K)
+  #define DISABLE_INACTIVE_K
+#endif
+#if !defined(DISABLE_INACTIVE_U) && ENABLED(DISABLE_U)
+  #define DISABLE_INACTIVE_U
+#endif
+#if !defined(DISABLE_INACTIVE_V) && ENABLED(DISABLE_V)
+  #define DISABLE_INACTIVE_V
+#endif
+#if !defined(DISABLE_INACTIVE_W) && ENABLED(DISABLE_W)
+  #define DISABLE_INACTIVE_W
+#endif
+#if !defined(DISABLE_INACTIVE_EXTRUDER) && ENABLED(DISABLE_E)
+  #define DISABLE_INACTIVE_EXTRUDER
+#endif
+#if ANY(DISABLE_INACTIVE_X, DISABLE_INACTIVE_Y, DISABLE_INACTIVE_Z, DISABLE_INACTIVE_I, DISABLE_INACTIVE_J, DISABLE_INACTIVE_K, DISABLE_INACTIVE_U, DISABLE_INACTIVE_V, DISABLE_INACTIVE_W, DISABLE_INACTIVE_EXTRUDER)
+  #define HAS_DISABLE_INACTIVE_AXIS 1
+#endif
+#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K, DISABLE_U, DISABLE_V, DISABLE_W, DISABLE_E)
+  #define HAS_DISABLE_AXIS 1
 #endif
 
 // Extruder steppers and solenoids
@@ -1651,11 +1645,6 @@
     #endif
   #endif
 
-  #if !defined(DISABLE_INACTIVE_E) && ENABLED(DISABLE_E)
-    #define DISABLE_INACTIVE_E 1
-  #endif
-#else
-  #undef DISABLE_INACTIVE_E
 #endif // HAS_EXTRUDERS
 
 /**

+ 4 - 0
Marlin/src/inc/SanityCheck.h

@@ -672,6 +672,10 @@
   #error "EXPERIMENTAL_SCURVE is no longer needed and should be removed."
 #elif defined(BABYSTEP_ZPROBE_GFX_OVERLAY)
   #error "BABYSTEP_ZPROBE_GFX_OVERLAY is now BABYSTEP_GFX_OVERLAY."
+#elif defined(DISABLE_INACTIVE_E)
+  #error "DISABLE_INACTIVE_E is now set with DISABLE_INACTIVE_EXTRUDER."
+#elif defined(INVERT_X_STEP_PIN) || defined(INVERT_Y_STEP_PIN) || defined(INVERT_Z_STEP_PIN) || defined(INVERT_I_STEP_PIN) || defined(INVERT_J_STEP_PIN) || defined(INVERT_K_STEP_PIN) || defined(INVERT_U_STEP_PIN) || defined(INVERT_V_STEP_PIN) || defined(INVERT_W_STEP_PIN) || defined(INVERT_E_STEP_PIN)
+  #error "INVERT_*_STEP_PIN true is now STEP_STATE_* LOW, and INVERT_*_STEP_PIN false is now STEP_STATE_* HIGH."
 #endif
 
 // L64xx stepper drivers have been removed

Некоторые файлы не были показаны из-за большого количества измененных файлов