Simplify / undef extra endstops (#21808)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
@ -441,40 +441,84 @@
|
||||
//
|
||||
// Disable unused endstop / probe pins
|
||||
//
|
||||
#define _STOP_IN_USE(N) (X2_USE_ENDSTOP == N || Y2_USE_ENDSTOP == N || Z2_USE_ENDSTOP == N || Z3_USE_ENDSTOP == N || Z4_USE_ENDSTOP == N)
|
||||
#if _STOP_IN_USE(_XMAX_)
|
||||
#define USE_XMAX_PLUG
|
||||
#endif
|
||||
#if _STOP_IN_USE(_YMAX_)
|
||||
#define USE_YMAX_PLUG
|
||||
#endif
|
||||
#if _STOP_IN_USE(_ZMAX_)
|
||||
#define USE_ZMAX_PLUG
|
||||
#endif
|
||||
#if _STOP_IN_USE(_XMIN_)
|
||||
#define USE_XMIN_PLUG
|
||||
#endif
|
||||
#if _STOP_IN_USE(_YMIN_)
|
||||
#define USE_YMIN_PLUG
|
||||
#endif
|
||||
#if _STOP_IN_USE(_ZMIN_)
|
||||
#define USE_ZMIN_PLUG
|
||||
#endif
|
||||
#undef _STOP_IN_USE
|
||||
#if !HAS_CUSTOM_PROBE_PIN
|
||||
#undef Z_MIN_PROBE_PIN
|
||||
#define Z_MIN_PROBE_PIN -1
|
||||
#endif
|
||||
|
||||
#if DISABLED(USE_XMAX_PLUG)
|
||||
#undef X_MAX_PIN
|
||||
#define X_MAX_PIN -1
|
||||
#endif
|
||||
|
||||
#if DISABLED(USE_YMAX_PLUG)
|
||||
#undef Y_MAX_PIN
|
||||
#define Y_MAX_PIN -1
|
||||
#endif
|
||||
|
||||
#if DISABLED(USE_ZMAX_PLUG)
|
||||
#undef Z_MAX_PIN
|
||||
#define Z_MAX_PIN -1
|
||||
#endif
|
||||
|
||||
#if DISABLED(USE_XMIN_PLUG)
|
||||
#undef X_MIN_PIN
|
||||
#define X_MIN_PIN -1
|
||||
#endif
|
||||
|
||||
#if DISABLED(USE_YMIN_PLUG)
|
||||
#undef Y_MIN_PIN
|
||||
#define Y_MIN_PIN -1
|
||||
#endif
|
||||
|
||||
#if DISABLED(USE_ZMIN_PLUG)
|
||||
#undef Z_MIN_PIN
|
||||
#define Z_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(X_DUAL_ENDSTOPS) || X_HOME_DIR > 0
|
||||
#undef X2_MIN_PIN
|
||||
#endif
|
||||
#if DISABLED(X_DUAL_ENDSTOPS) || X_HOME_DIR < 0
|
||||
#undef X2_MAX_PIN
|
||||
#endif
|
||||
#if DISABLED(Y_DUAL_ENDSTOPS) || Y_HOME_DIR > 0
|
||||
#undef Y2_MIN_PIN
|
||||
#endif
|
||||
#if DISABLED(Y_DUAL_ENDSTOPS) || Y_HOME_DIR < 0
|
||||
#undef Y2_MAX_PIN
|
||||
#endif
|
||||
#if DISABLED(Z_MULTI_ENDSTOPS) || Z_HOME_DIR > 0
|
||||
#undef Z2_MIN_PIN
|
||||
#endif
|
||||
#if DISABLED(Z_MULTI_ENDSTOPS) || Z_HOME_DIR < 0
|
||||
#undef Z2_MAX_PIN
|
||||
#endif
|
||||
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 3 || Z_HOME_DIR > 0
|
||||
#undef Z3_MIN_PIN
|
||||
#endif
|
||||
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 3 || Z_HOME_DIR < 0
|
||||
#undef Z3_MAX_PIN
|
||||
#endif
|
||||
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 4 || Z_HOME_DIR > 0
|
||||
#undef Z4_MIN_PIN
|
||||
#endif
|
||||
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 4 || Z_HOME_DIR < 0
|
||||
#undef Z4_MAX_PIN
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
#define FIL_RUNOUT1_PIN FIL_RUNOUT_PIN
|
||||
|
Reference in New Issue
Block a user