🔧 Fix Z_MULTI_ENDSTOPS pin post-process (#27137)
This commit is contained in:
@@ -2466,6 +2466,51 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
|
||||
#elif Z_SPI_SENSORLESS && !(AXIS_HAS_SPI(Z2) && (NUM_Z_STEPPERS < 3 || AXIS_HAS_SPI(Z3)) && (NUM_Z_STEPPERS < 4 || AXIS_HAS_SPI(Z4)))
|
||||
#error "All Z Stepper Drivers must be SPI-capable to use SPI Endstops on Z."
|
||||
#endif
|
||||
#if PIN_EXISTS(Z2_STOP)
|
||||
#if X_HOME_TO_MIN && Z2_STOP_PIN == X_MIN_PIN
|
||||
#error "Z2_STOP_PIN can't be the same as X_MIN_PIN when homing to X_MIN"
|
||||
#elif X_HOME_TO_MAX && Z2_STOP_PIN == X_MAX_PIN
|
||||
#error "Z2_STOP_PIN can't be the same as X_MAX_PIN when homing to X_MAX"
|
||||
#elif Y_HOME_TO_MIN && Z2_STOP_PIN == Y_MIN_PIN
|
||||
#error "Z2_STOP_PIN can't be the same as Y_MIN_PIN when homing to Y_MIN"
|
||||
#elif Y_HOME_TO_MAX && Z2_STOP_PIN == Y_MAX_PIN
|
||||
#error "Z2_STOP_PIN can't be the same as Y_MAX_PIN when homing to Y_MAX"
|
||||
#elif Z_HOME_TO_MIN && Z2_STOP_PIN == Z_MIN_PIN
|
||||
#error "Z2_STOP_PIN can't be the same as Z_MIN_PIN when homing to Z_MIN"
|
||||
#elif Z_HOME_TO_MAX && Z2_STOP_PIN == Z_MAX_PIN
|
||||
#error "Z2_STOP_PIN can't be the same as Z_MAX_PIN when homing to Z_MAX"
|
||||
#endif
|
||||
#endif
|
||||
#if PIN_EXISTS(Z3_STOP)
|
||||
#if X_HOME_TO_MIN && Z3_STOP_PIN == X_MIN_PIN
|
||||
#error "Z3_STOP_PIN can't be the same as X_MIN_PIN when homing to X_MIN"
|
||||
#elif X_HOME_TO_MAX && Z3_STOP_PIN == X_MAX_PIN
|
||||
#error "Z3_STOP_PIN can't be the same as X_MAX_PIN when homing to X_MAX"
|
||||
#elif Y_HOME_TO_MIN && Z3_STOP_PIN == Y_MIN_PIN
|
||||
#error "Z3_STOP_PIN can't be the same as Y_MIN_PIN when homing to Y_MIN"
|
||||
#elif Y_HOME_TO_MAX && Z3_STOP_PIN == Y_MAX_PIN
|
||||
#error "Z3_STOP_PIN can't be the same as Y_MAX_PIN when homing to Y_MAX"
|
||||
#elif Z_HOME_TO_MIN && Z3_STOP_PIN == Z_MIN_PIN
|
||||
#error "Z3_STOP_PIN can't be the same as Z_MIN_PIN when homing to Z_MIN"
|
||||
#elif Z_HOME_TO_MAX && Z3_STOP_PIN == Z_MAX_PIN
|
||||
#error "Z3_STOP_PIN can't be the same as Z_MAX_PIN when homing to Z_MAX"
|
||||
#endif
|
||||
#endif
|
||||
#if PIN_EXISTS(Z4_STOP)
|
||||
#if X_HOME_TO_MIN && Z4_STOP_PIN == X_MIN_PIN
|
||||
#error "Z4_STOP_PIN can't be the same as X_MIN_PIN when homing to X_MIN"
|
||||
#elif X_HOME_TO_MAX && Z4_STOP_PIN == X_MAX_PIN
|
||||
#error "Z4_STOP_PIN can't be the same as X_MAX_PIN when homing to X_MAX"
|
||||
#elif Y_HOME_TO_MIN && Z4_STOP_PIN == Y_MIN_PIN
|
||||
#error "Z4_STOP_PIN can't be the same as Y_MIN_PIN when homing to Y_MIN"
|
||||
#elif Y_HOME_TO_MAX && Z4_STOP_PIN == Y_MAX_PIN
|
||||
#error "Z4_STOP_PIN can't be the same as Y_MAX_PIN when homing to Y_MAX"
|
||||
#elif Z_HOME_TO_MIN && Z4_STOP_PIN == Z_MIN_PIN
|
||||
#error "Z4_STOP_PIN can't be the same as Z_MIN_PIN when homing to Z_MIN"
|
||||
#elif Z_HOME_TO_MAX && Z4_STOP_PIN == Z_MAX_PIN
|
||||
#error "Z4_STOP_PIN can't be the same as Z_MAX_PIN when homing to Z_MAX"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(ENDSTOP_NOISE_THRESHOLD) && !WITHIN(ENDSTOP_NOISE_THRESHOLD, 2, 7)
|
||||
|
@@ -556,20 +556,20 @@
|
||||
#elif Z_HOME_TO_MAX
|
||||
#define Z_MAX_PIN Z_STOP_PIN
|
||||
#endif
|
||||
#elif Z_HOME_TO_MIN
|
||||
#define Z_STOP_PIN Z_MIN_PIN
|
||||
#elif Z_HOME_TO_MAX
|
||||
#define Z_STOP_PIN Z_MAX_PIN
|
||||
#endif
|
||||
#if ENABLED(Z_MULTI_ENDSTOPS) && PIN_EXISTS(Z_STOP)
|
||||
#ifndef Z2_STOP_PIN
|
||||
#define Z2_STOP_PIN Z_STOP_PIN
|
||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||
#if ((Z_HOME_TO_MIN && !defined(Z2_MIN_PIN)) || (Z_HOME_TO_MAX && !defined(Z2_MAX_PIN))) && !defined(Z2_STOP_PIN)
|
||||
#error "Z2_STOP_PIN is required for Z_MULTI_ENDSTOPS. Define Z2_STOP_PIN in Configuration_adv.h."
|
||||
#endif
|
||||
#if NUM_Z_STEPPERS >= 3 && !defined(Z3_STOP_PIN)
|
||||
#define Z3_STOP_PIN Z_STOP_PIN
|
||||
#if NUM_Z_STEPPERS >= 3
|
||||
#if ((Z_HOME_TO_MIN && !defined(Z3_MIN_PIN)) || (Z_HOME_TO_MAX && !defined(Z3_MAX_PIN))) && !defined(Z3_STOP_PIN)
|
||||
#error "Z3_STOP_PIN is required for Z_MULTI_ENDSTOPS with NUM_Z_STEPPERS >= 3. Define Z3_STOP_PIN in Configuration_adv.h."
|
||||
#endif
|
||||
#endif
|
||||
#if NUM_Z_STEPPERS >= 4 && !defined(Z4_STOP_PIN)
|
||||
#define Z4_STOP_PIN Z_STOP_PIN
|
||||
#if NUM_Z_STEPPERS >= 4
|
||||
#if ((Z_HOME_TO_MIN && !defined(Z4_MIN_PIN)) || (Z_HOME_TO_MAX && !defined(Z4_MAX_PIN))) && !defined(Z4_STOP_PIN)
|
||||
#error "Z4_STOP_PIN is required for Z_MULTI_ENDSTOPS with NUM_Z_STEPPERS == 4. Define Z4_STOP_PIN in Configuration_adv.h."
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user