💥 Num Axes / Multi-Stepper based on Driver Types (#24106, #24120)

This commit is contained in:
Scott Lahteine
2022-04-29 15:21:15 -05:00
parent 1e127a93c4
commit 1d8d8dccf4
36 changed files with 571 additions and 507 deletions

View File

@ -669,13 +669,37 @@
* Number of Linear Axes (e.g., XYZ)
* All the logical axes except for the tool (E) axis
*/
#ifndef LINEAR_AXES
#define LINEAR_AXES XYZ
#ifdef LINEAR_AXES
#undef LINEAR_AXES
#define LINEAR_AXES_WARNING 1
#endif
#ifdef K_DRIVER_TYPE
#define LINEAR_AXES 6
#elif defined(J_DRIVER_TYPE)
#define LINEAR_AXES 5
#elif defined(I_DRIVER_TYPE)
#define LINEAR_AXES 4
#elif defined(Z_DRIVER_TYPE)
#define LINEAR_AXES 3
#elif defined(Y_DRIVER_TYPE)
#define LINEAR_AXES 2
#else
#define LINEAR_AXES 1
#endif
#if LINEAR_AXES >= XY
#define HAS_Y_AXIS 1
#if LINEAR_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 LINEAR_AXES >= 4
#define HAS_I_AXIS 1
#if LINEAR_AXES >= 5
@ -688,6 +712,156 @@
#endif
#endif
#if E_STEPPERS <= 0
#undef E0_DRIVER_TYPE
#endif
#if E_STEPPERS <= 1
#undef E1_DRIVER_TYPE
#endif
#if E_STEPPERS <= 2
#undef E2_DRIVER_TYPE
#endif
#if E_STEPPERS <= 3
#undef E3_DRIVER_TYPE
#endif
#if E_STEPPERS <= 4
#undef E4_DRIVER_TYPE
#endif
#if E_STEPPERS <= 5
#undef E5_DRIVER_TYPE
#endif
#if E_STEPPERS <= 6
#undef E6_DRIVER_TYPE
#endif
#if E_STEPPERS <= 7
#undef E7_DRIVER_TYPE
#endif
#if !HAS_Y_AXIS
#undef ENDSTOPPULLUP_YMIN
#undef ENDSTOPPULLUP_YMAX
#undef Y_MIN_ENDSTOP_INVERTING
#undef Y_MAX_ENDSTOP_INVERTING
#undef Y2_DRIVER_TYPE
#undef Y_ENABLE_ON
#undef DISABLE_Y
#undef INVERT_Y_DIR
#undef Y_HOME_DIR
#undef Y_MIN_POS
#undef Y_MAX_POS
#undef MANUAL_Y_HOME_POS
#endif
#if !HAS_Z_AXIS
#undef ENDSTOPPULLUP_ZMIN
#undef ENDSTOPPULLUP_ZMAX
#undef Z_MIN_ENDSTOP_INVERTING
#undef Z_MAX_ENDSTOP_INVERTING
#undef Z2_DRIVER_TYPE
#undef Z3_DRIVER_TYPE
#undef Z4_DRIVER_TYPE
#undef Z_ENABLE_ON
#undef DISABLE_Z
#undef INVERT_Z_DIR
#undef Z_HOME_DIR
#undef Z_MIN_POS
#undef Z_MAX_POS
#undef MANUAL_Z_HOME_POS
#endif
#if !HAS_I_AXIS
#undef ENDSTOPPULLUP_IMIN
#undef ENDSTOPPULLUP_IMAX
#undef I_MIN_ENDSTOP_INVERTING
#undef I_MAX_ENDSTOP_INVERTING
#undef I_ENABLE_ON
#undef DISABLE_I
#undef INVERT_I_DIR
#undef I_HOME_DIR
#undef I_MIN_POS
#undef I_MAX_POS
#undef MANUAL_I_HOME_POS
#endif
#if !HAS_J_AXIS
#undef ENDSTOPPULLUP_JMIN
#undef ENDSTOPPULLUP_JMAX
#undef J_MIN_ENDSTOP_INVERTING
#undef J_MAX_ENDSTOP_INVERTING
#undef J_ENABLE_ON
#undef DISABLE_J
#undef INVERT_J_DIR
#undef J_HOME_DIR
#undef J_MIN_POS
#undef J_MAX_POS
#undef MANUAL_J_HOME_POS
#endif
#if !HAS_K_AXIS
#undef ENDSTOPPULLUP_KMIN
#undef ENDSTOPPULLUP_KMAX
#undef K_MIN_ENDSTOP_INVERTING
#undef K_MAX_ENDSTOP_INVERTING
#undef K_ENABLE_ON
#undef DISABLE_K
#undef INVERT_K_DIR
#undef K_HOME_DIR
#undef K_MIN_POS
#undef K_MAX_POS
#undef MANUAL_K_HOME_POS
#endif
#if !HAS_U_AXIS
#undef ENDSTOPPULLUP_UMIN
#undef ENDSTOPPULLUP_UMAX
#undef U_MIN_ENDSTOP_INVERTING
#undef U_MAX_ENDSTOP_INVERTING
#undef U_ENABLE_ON
#undef DISABLE_U
#undef INVERT_U_DIR
#undef U_HOME_DIR
#undef U_MIN_POS
#undef U_MAX_POS
#undef MANUAL_U_HOME_POS
#endif
#if !HAS_V_AXIS
#undef ENDSTOPPULLUP_VMIN
#undef ENDSTOPPULLUP_VMAX
#undef V_MIN_ENDSTOP_INVERTING
#undef V_MAX_ENDSTOP_INVERTING
#undef V_ENABLE_ON
#undef DISABLE_V
#undef INVERT_V_DIR
#undef V_HOME_DIR
#undef V_MIN_POS
#undef V_MAX_POS
#undef MANUAL_V_HOME_POS
#endif
#if !HAS_W_AXIS
#undef ENDSTOPPULLUP_WMIN
#undef ENDSTOPPULLUP_WMAX
#undef W_MIN_ENDSTOP_INVERTING
#undef W_MAX_ENDSTOP_INVERTING
#undef W_ENABLE_ON
#undef DISABLE_W
#undef INVERT_W_DIR
#undef W_HOME_DIR
#undef W_MIN_POS
#undef W_MAX_POS
#undef MANUAL_W_HOME_POS
#endif
#ifdef X2_DRIVER_TYPE
#define HAS_X2_STEPPER 1
// Dual X Carriage isn't known yet. TODO: Consider moving it to Configuration.h.
#endif
#ifdef Y2_DRIVER_TYPE
#define HAS_Y2_STEPPER 1
#define HAS_DUAL_Y_STEPPERS 1
#endif
/**
* Number of Logical Axes (e.g., XYZE)
* All the logical axes that can be commanded directly by G-code.
@ -1136,95 +1310,6 @@
#define HAS_ETHERNET 1
#endif
// Fallback Stepper Driver types that don't depend on Configuration_adv.h
#ifndef X_DRIVER_TYPE
#define X_DRIVER_TYPE A4988
#endif
#ifndef X2_DRIVER_TYPE
#define X2_DRIVER_TYPE A4988
#endif
#ifndef Y_DRIVER_TYPE
#define Y_DRIVER_TYPE A4988
#endif
#ifndef Y2_DRIVER_TYPE
#define Y2_DRIVER_TYPE A4988
#endif
#ifndef Z_DRIVER_TYPE
#define Z_DRIVER_TYPE A4988
#endif
#ifndef Z2_DRIVER_TYPE
#define Z2_DRIVER_TYPE A4988
#endif
#ifndef Z3_DRIVER_TYPE
#define Z3_DRIVER_TYPE A4988
#endif
#ifndef Z4_DRIVER_TYPE
#define Z4_DRIVER_TYPE A4988
#endif
#if E_STEPPERS <= 0
#undef E0_DRIVER_TYPE
#elif !defined(E0_DRIVER_TYPE)
#define E0_DRIVER_TYPE A4988
#endif
#if E_STEPPERS <= 1
#undef E1_DRIVER_TYPE
#elif !defined(E1_DRIVER_TYPE)
#define E1_DRIVER_TYPE A4988
#endif
#if E_STEPPERS <= 2
#undef E2_DRIVER_TYPE
#elif !defined(E2_DRIVER_TYPE)
#define E2_DRIVER_TYPE A4988
#endif
#if E_STEPPERS <= 3
#undef E3_DRIVER_TYPE
#elif !defined(E3_DRIVER_TYPE)
#define E3_DRIVER_TYPE A4988
#endif
#if E_STEPPERS <= 4
#undef E4_DRIVER_TYPE
#elif !defined(E4_DRIVER_TYPE)
#define E4_DRIVER_TYPE A4988
#endif
#if E_STEPPERS <= 5
#undef E5_DRIVER_TYPE
#elif !defined(E5_DRIVER_TYPE)
#define E5_DRIVER_TYPE A4988
#endif
#if E_STEPPERS <= 6
#undef E6_DRIVER_TYPE
#elif !defined(E6_DRIVER_TYPE)
#define E6_DRIVER_TYPE A4988
#endif
#if E_STEPPERS <= 7
#undef E7_DRIVER_TYPE
#elif !defined(E7_DRIVER_TYPE)
#define E7_DRIVER_TYPE A4988
#endif
// Fallback axis inverting
#ifndef INVERT_X_DIR
#define INVERT_X_DIR false
#endif
#if HAS_Y_AXIS && !defined(INVERT_Y_DIR)
#define INVERT_Y_DIR false
#endif
#if HAS_Z_AXIS && !defined(INVERT_Z_DIR)
#define INVERT_Z_DIR false
#endif
#if HAS_I_AXIS && !defined(INVERT_I_DIR)
#define INVERT_I_DIR false
#endif
#if HAS_J_AXIS && !defined(INVERT_J_DIR)
#define INVERT_J_DIR false
#endif
#if HAS_K_AXIS && !defined(INVERT_K_DIR)
#define INVERT_K_DIR false
#endif
#if HAS_EXTRUDERS && !defined(INVERT_E_DIR)
#define INVERT_E_DIR false
#endif
/**
* This setting is also used by M109 when trying to calculate
* a ballpark safe margin to prevent wait-forever situation.

View File

@ -650,33 +650,20 @@
#endif
// Multiple Z steppers
#ifndef NUM_Z_STEPPER_DRIVERS
#define NUM_Z_STEPPER_DRIVERS 1
#endif
// Fallback Stepper Driver types that depend on Configuration_adv.h
#if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS)
#define HAS_X2_STEPPER 1
#else
#undef X2_DRIVER_TYPE
#endif
#if DISABLED(Y_DUAL_STEPPER_DRIVERS)
#undef Y2_DRIVER_TYPE
#endif
#if NUM_Z_STEPPER_DRIVERS < 4
#undef Z4_DRIVER_TYPE
#if NUM_Z_STEPPERS < 4
#undef INVERT_Z4_VS_Z_DIR
#if NUM_Z_STEPPER_DRIVERS < 3
#undef Z3_DRIVER_TYPE
#if NUM_Z_STEPPERS < 3
#undef INVERT_Z3_VS_Z_DIR
#if NUM_Z_STEPPER_DRIVERS < 2
#undef Z2_DRIVER_TYPE
#if NUM_Z_STEPPERS < 2
#undef INVERT_Z2_VS_Z_DIR
#endif
#endif
#endif
#if defined(X2_DRIVER_TYPE) && DISABLED(DUAL_X_CARRIAGE)
#define HAS_DUAL_X_STEPPERS 1
#endif
//
// Spindle/Laser power display types
// Defined here so sanity checks can use them
@ -944,7 +931,7 @@
#undef HOME_Z_FIRST
#undef HOMING_Z_WITH_PROBE
#undef ENABLE_LEVELING_FADE_HEIGHT
#undef NUM_Z_STEPPER_DRIVERS
#undef NUM_Z_STEPPERS
#undef CNC_WORKSPACE_PLANES
#if LINEAR_AXES < 2
#undef STEALTHCHOP_Y

View File

@ -1152,7 +1152,7 @@
#endif
#endif
#if NUM_Z_STEPPER_DRIVERS >= 3
#if NUM_Z_STEPPERS >= 3
#if Z_HOME_TO_MAX
#ifndef Z3_MAX_ENDSTOP_INVERTING
#if Z3_USE_ENDSTOP == _XMIN_
@ -1284,7 +1284,7 @@
#endif
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4
#if NUM_Z_STEPPERS >= 4
#if Z_HOME_TO_MAX
#ifndef Z4_MAX_ENDSTOP_INVERTING
#if Z4_USE_ENDSTOP == _XMIN_
@ -1575,7 +1575,7 @@
#undef DISABLE_INACTIVE_Z
#endif
#if NUM_Z_STEPPER_DRIVERS >= 2
#if NUM_Z_STEPPERS >= 2
#if PIN_EXISTS(Z2_ENABLE) || AXIS_IS_L64XX(Z2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))
#define HAS_Z2_ENABLE 1
#endif
@ -1590,7 +1590,7 @@
#endif
#endif
#if NUM_Z_STEPPER_DRIVERS >= 3
#if NUM_Z_STEPPERS >= 3
#if PIN_EXISTS(Z3_ENABLE) || AXIS_IS_L64XX(Z3) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))
#define HAS_Z3_ENABLE 1
#endif
@ -1605,7 +1605,7 @@
#endif
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4
#if NUM_Z_STEPPERS >= 4
#if PIN_EXISTS(Z4_ENABLE) || AXIS_IS_L64XX(Z4) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))
#define HAS_Z4_ENABLE 1
#endif
@ -1920,7 +1920,7 @@
#ifndef Y_SLAVE_ADDRESS
#define Y_SLAVE_ADDRESS 0
#endif
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
#if HAS_DUAL_Y_STEPPERS
#if defined(Y2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Y2)
#define Y2_SENSORLESS 1
#endif
@ -1958,7 +1958,7 @@
#ifndef Z_SLAVE_ADDRESS
#define Z_SLAVE_ADDRESS 0
#endif
#if NUM_Z_STEPPER_DRIVERS >= 2
#if NUM_Z_STEPPERS >= 2
#if defined(Z2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z2)
#define Z2_SENSORLESS 1
#endif
@ -1975,7 +1975,7 @@
#define Z2_SLAVE_ADDRESS 0
#endif
#endif
#if NUM_Z_STEPPER_DRIVERS >= 3
#if NUM_Z_STEPPERS >= 3
#if defined(Z3_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z3)
#define Z3_SENSORLESS 1
#endif
@ -1992,7 +1992,7 @@
#define Z3_SLAVE_ADDRESS 0
#endif
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4
#if NUM_Z_STEPPERS >= 4
#if defined(Z4_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z4)
#define Z4_SENSORLESS 1
#endif
@ -2309,8 +2309,8 @@
#define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_)
#define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_)
#define IS_Z2_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_)
#define IS_Z3_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 && Z3_USE_ENDSTOP == _##A##M##_)
#define IS_Z4_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 && Z4_USE_ENDSTOP == _##A##M##_)
#define IS_Z3_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 3 && Z3_USE_ENDSTOP == _##A##M##_)
#define IS_Z4_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 4 && Z4_USE_ENDSTOP == _##A##M##_)
#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))
#if _HAS_STOP(X,MIN)

View File

@ -524,11 +524,11 @@
#elif defined(Z_QUAD_ENDSTOPS_ADJUSTMENT2) || defined(Z_QUAD_ENDSTOPS_ADJUSTMENT3) || defined(Z_QUAD_ENDSTOPS_ADJUSTMENT4)
#error "Z_QUAD_ENDSTOPS_ADJUSTMENT[234] is now Z[234]_ENDSTOP_ADJUSTMENT."
#elif defined(Z_DUAL_STEPPER_DRIVERS)
#error "Z_DUAL_STEPPER_DRIVERS is now NUM_Z_STEPPER_DRIVERS with a value of 2."
#error "Z_DUAL_STEPPER_DRIVERS is no longer needed and should be removed."
#elif defined(Z_TRIPLE_STEPPER_DRIVERS)
#error "Z_TRIPLE_STEPPER_DRIVERS is now NUM_Z_STEPPER_DRIVERS with a value of 3."
#error "Z_TRIPLE_STEPPER_DRIVERS is no longer needed and should be removed."
#elif defined(Z_QUAD_STEPPER_DRIVERS)
#error "Z_QUAD_STEPPER_DRIVERS is now NUM_Z_STEPPER_DRIVERS with a value of 4."
#error "Z_QUAD_STEPPER_DRIVERS is no longer needed and should be removed."
#elif defined(Z_DUAL_ENDSTOPS) || defined(Z_TRIPLE_ENDSTOPS) || defined(Z_QUAD_ENDSTOPS)
#error "Z_(DUAL|TRIPLE|QUAD)_ENDSTOPS is now Z_MULTI_ENDSTOPS."
#elif defined(DUGS_UI_MOVE_DIS_OPTION)
@ -619,6 +619,12 @@
#error "Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS is now just Z_STEPPER_ALIGN_STEPPER_XY."
#elif defined(DWIN_CREALITY_LCD_ENHANCED)
#error "DWIN_CREALITY_LCD_ENHANCED is now DWIN_LCD_PROUI."
#elif defined(X_DUAL_STEPPER_DRIVERS)
#error "X_DUAL_STEPPER_DRIVERS is no longer needed and should be removed."
#elif defined(Y_DUAL_STEPPER_DRIVERS)
#error "Y_DUAL_STEPPER_DRIVERS is no longer needed and should be removed."
#elif defined(NUM_Z_STEPPER_DRIVERS)
#error "NUM_Z_STEPPER_DRIVERS is no longer needed and should be removed."
#endif
constexpr float arm[] = AXIS_RELATIVE_MODES;
@ -735,27 +741,21 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
* Multiple Stepper Drivers Per Axis
*/
#define GOOD_AXIS_PINS(A) (HAS_##A##_ENABLE && HAS_##A##_STEP && HAS_##A##_DIR)
#if ENABLED(X_DUAL_STEPPER_DRIVERS)
#if ENABLED(DUAL_X_CARRIAGE)
#error "DUAL_X_CARRIAGE is not compatible with X_DUAL_STEPPER_DRIVERS."
#elif !GOOD_AXIS_PINS(X)
#error "X_DUAL_STEPPER_DRIVERS requires X2 pins to be defined."
#endif
#if HAS_X2_STEPPER && !GOOD_AXIS_PINS(X)
#error "If X2_DRIVER_TYPE is defined, then X2 ENABLE/STEP/DIR pins are also needed."
#endif
#if ENABLED(Y_DUAL_STEPPER_DRIVERS) && !GOOD_AXIS_PINS(Y)
#error "Y_DUAL_STEPPER_DRIVERS requires Y2 pins to be defined."
#if HAS_DUAL_Y_STEPPERS && !GOOD_AXIS_PINS(Y)
#error "If Y2_DRIVER_TYPE is defined, then Y2 ENABLE/STEP/DIR pins are also needed."
#endif
#if HAS_Z_AXIS
#if !WITHIN(NUM_Z_STEPPER_DRIVERS, 1, 4)
#error "NUM_Z_STEPPER_DRIVERS must be an integer from 1 to 4."
#elif NUM_Z_STEPPER_DRIVERS == 2 && !GOOD_AXIS_PINS(Z2)
#error "If NUM_Z_STEPPER_DRIVERS is 2, you must define stepper pins for Z2."
#elif NUM_Z_STEPPER_DRIVERS == 3 && !(GOOD_AXIS_PINS(Z2) && GOOD_AXIS_PINS(Z3))
#error "If NUM_Z_STEPPER_DRIVERS is 3, you must define stepper pins for Z2 and Z3."
#elif NUM_Z_STEPPER_DRIVERS == 4 && !(GOOD_AXIS_PINS(Z2) && GOOD_AXIS_PINS(Z3) && GOOD_AXIS_PINS(Z4))
#error "If NUM_Z_STEPPER_DRIVERS is 4, you must define stepper pins for Z2, Z3, and Z4."
#if NUM_Z_STEPPERS >= 2 && !GOOD_AXIS_PINS(Z2)
#error "If Z2_DRIVER_TYPE is defined, then Z2 ENABLE/STEP/DIR pins are also needed."
#elif NUM_Z_STEPPERS >= 3 && !GOOD_AXIS_PINS(Z3)
#error "If Z3_DRIVER_TYPE is defined, then Z3 ENABLE/STEP/DIR pins are also needed."
#elif NUM_Z_STEPPERS >= 4 && !GOOD_AXIS_PINS(Z4)
#error "If Z4_DRIVER_TYPE is defined, then Z4 ENABLE/STEP/DIR pins are also needed."
#endif
#endif
@ -2531,10 +2531,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "Z_MULTI_ENDSTOPS is not compatible with DELTA."
#elif !Z2_USE_ENDSTOP
#error "Z2_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS."
#elif !Z3_USE_ENDSTOP && NUM_Z_STEPPER_DRIVERS >= 3
#error "Z3_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and NUM_Z_STEPPER_DRIVERS >= 3."
#elif !Z4_USE_ENDSTOP && NUM_Z_STEPPER_DRIVERS >= 4
#error "Z4_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and NUM_Z_STEPPER_DRIVERS >= 4."
#elif !Z3_USE_ENDSTOP && NUM_Z_STEPPERS >= 3
#error "Z3_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and Z3_DRIVER_TYPE."
#elif !Z4_USE_ENDSTOP && NUM_Z_STEPPERS >= 4
#error "Z4_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and Z4_DRIVER_TYPE."
#endif
#endif
@ -3504,14 +3504,14 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#endif
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
#if NUM_Z_STEPPER_DRIVERS <= 1
#error "Z_STEPPER_AUTO_ALIGN requires NUM_Z_STEPPER_DRIVERS greater than 1."
#if NUM_Z_STEPPERS <= 1
#error "Z_STEPPER_AUTO_ALIGN requires more than one Z stepper."
#elif !HAS_BED_PROBE
#error "Z_STEPPER_AUTO_ALIGN requires a Z-bed probe."
#elif HAS_Z_STEPPER_ALIGN_STEPPER_XY
static_assert(WITHIN(Z_STEPPER_ALIGN_AMP, 0.5, 2.0), "Z_STEPPER_ALIGN_AMP must be between 0.5 and 2.0.");
#if NUM_Z_STEPPER_DRIVERS < 3
#error "Z_STEPPER_ALIGN_STEPPER_XY requires NUM_Z_STEPPER_DRIVERS to be 3 or 4."
#if NUM_Z_STEPPERS < 3
#error "Z_STEPPER_ALIGN_STEPPER_XY requires 3 or 4 Z steppers."
#endif
#endif
#endif

View File

@ -35,6 +35,10 @@
#warning "WARNING! Disable MARLIN_DEV_MODE for the final build!"
#endif
#if LINEAR_AXES_WARNING
#warning "Note: LINEAR_AXES is now based on the *_DRIVER_TYPE settings so you can remove LINEAR_AXES from Configuration.h."
#endif
// Safety Features
#if DISABLED(USE_WATCHDOG)
#warning "Safety Alert! Enable USE_WATCHDOG for the final build!"