mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-01-22 17:52:57 +00:00
🔧 Fix extra endstop auto-assignment
This commit is contained in:
parent
3b33f7ec03
commit
e05ac66561
1 changed files with 140 additions and 120 deletions
|
@ -750,6 +750,7 @@
|
|||
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||
#if X_HOME_TO_MAX
|
||||
#ifndef X2_MAX_ENDSTOP_HIT_STATE
|
||||
#if PIN_EXISTS(X2_STOP)
|
||||
#if X2_STOP_PIN == X_MIN_PIN
|
||||
#define X2_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE
|
||||
#elif X2_STOP_PIN == X_MAX_PIN
|
||||
|
@ -764,6 +765,7 @@
|
|||
#define X2_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if !PIN_EXISTS(X2_MAX)
|
||||
#undef X2_MAX_PIN
|
||||
#if PIN_EXISTS(X2_STOP)
|
||||
|
@ -772,6 +774,7 @@
|
|||
#endif
|
||||
#else
|
||||
#ifndef X2_MIN_ENDSTOP_HIT_STATE
|
||||
#if PIN_EXISTS(X2_STOP)
|
||||
#if X2_STOP_PIN == X_MIN_PIN
|
||||
#define X2_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE
|
||||
#elif X2_STOP_PIN == X_MAX_PIN
|
||||
|
@ -786,6 +789,7 @@
|
|||
#define X2_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if !PIN_EXISTS(X2_MIN)
|
||||
#undef X2_MIN_PIN
|
||||
#if PIN_EXISTS(X2_STOP)
|
||||
|
@ -807,6 +811,7 @@
|
|||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||
#if Y_HOME_TO_MAX
|
||||
#ifndef Y2_MAX_ENDSTOP_HIT_STATE
|
||||
#if PIN_EXISTS(Y2_STOP)
|
||||
#if Y2_STOP_PIN == X_MIN_PIN
|
||||
#define Y2_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE
|
||||
#elif Y2_STOP_PIN == X_MAX_PIN
|
||||
|
@ -821,6 +826,7 @@
|
|||
#define Y2_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if !PIN_EXISTS(Y2_MAX)
|
||||
#undef Y2_MAX_PIN
|
||||
#if PIN_EXISTS(Y2_STOP)
|
||||
|
@ -829,6 +835,7 @@
|
|||
#endif
|
||||
#else
|
||||
#ifndef Y2_MIN_ENDSTOP_HIT_STATE
|
||||
#if PIN_EXISTS(Y2_STOP)
|
||||
#if Y2_STOP_PIN == X_MIN_PIN
|
||||
#define Y2_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE
|
||||
#elif Y2_STOP_PIN == X_MAX_PIN
|
||||
|
@ -843,6 +850,7 @@
|
|||
#define Y2_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if !PIN_EXISTS(Y2_MIN)
|
||||
#undef Y2_MIN_PIN
|
||||
#if PIN_EXISTS(Y2_STOP)
|
||||
|
@ -865,6 +873,7 @@
|
|||
|
||||
#if Z_HOME_TO_MAX
|
||||
#ifndef Z2_MAX_ENDSTOP_HIT_STATE
|
||||
#if PIN_EXISTS(Z2_STOP)
|
||||
#if Z2_STOP_PIN == X_MIN_PIN
|
||||
#define Z2_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE
|
||||
#elif Z2_STOP_PIN == X_MAX_PIN
|
||||
|
@ -879,6 +888,7 @@
|
|||
#define Z2_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if !PIN_EXISTS(Z2_MAX)
|
||||
#undef Z2_MAX_PIN
|
||||
#if PIN_EXISTS(Z2_STOP)
|
||||
|
@ -887,6 +897,7 @@
|
|||
#endif
|
||||
#else
|
||||
#ifndef Z2_MIN_ENDSTOP_HIT_STATE
|
||||
#if PIN_EXISTS(Z2_STOP)
|
||||
#if Z2_STOP_PIN == X_MIN_PIN
|
||||
#define Z2_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE
|
||||
#elif Z2_STOP_PIN == X_MAX_PIN
|
||||
|
@ -901,6 +912,7 @@
|
|||
#define Z2_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if !PIN_EXISTS(Z2_MIN)
|
||||
#undef Z2_MIN_PIN
|
||||
#if PIN_EXISTS(Z2_STOP)
|
||||
|
@ -918,6 +930,7 @@
|
|||
#if NUM_Z_STEPPERS >= 3
|
||||
#if Z_HOME_TO_MAX
|
||||
#ifndef Z3_MAX_ENDSTOP_HIT_STATE
|
||||
#if PIN_EXISTS(Z3_STOP)
|
||||
#if Z3_STOP_PIN == X_MIN_PIN
|
||||
#define Z3_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE
|
||||
#elif Z3_STOP_PIN == X_MAX_PIN
|
||||
|
@ -932,6 +945,7 @@
|
|||
#define Z3_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if !PIN_EXISTS(Z3_MAX)
|
||||
#undef Z3_MAX_PIN
|
||||
#if PIN_EXISTS(Z3_STOP)
|
||||
|
@ -940,6 +954,7 @@
|
|||
#endif
|
||||
#else
|
||||
#ifndef Z3_MIN_ENDSTOP_HIT_STATE
|
||||
#if PIN_EXISTS(Z3_STOP)
|
||||
#if Z3_STOP_PIN == X_MIN_PIN
|
||||
#define Z3_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE
|
||||
#elif Z3_STOP_PIN == X_MAX_PIN
|
||||
|
@ -954,6 +969,7 @@
|
|||
#define Z3_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if !PIN_EXISTS(Z3_MIN)
|
||||
#undef Z3_MIN_PIN
|
||||
#if PIN_EXISTS(Z3_STOP)
|
||||
|
@ -972,6 +988,7 @@
|
|||
#if NUM_Z_STEPPERS >= 4
|
||||
#if Z_HOME_TO_MAX
|
||||
#ifndef Z4_MAX_ENDSTOP_HIT_STATE
|
||||
#if PIN_EXISTS(Z4_STOP)
|
||||
#if Z4_STOP_PIN == X_MIN_PIN
|
||||
#define Z4_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE
|
||||
#elif Z4_STOP_PIN == X_MAX_PIN
|
||||
|
@ -986,6 +1003,7 @@
|
|||
#define Z4_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if !PIN_EXISTS(Z4_MAX)
|
||||
#undef Z4_MAX_PIN
|
||||
#if PIN_EXISTS(Z4_STOP)
|
||||
|
@ -994,6 +1012,7 @@
|
|||
#endif
|
||||
#else
|
||||
#ifndef Z4_MIN_ENDSTOP_HIT_STATE
|
||||
#if PIN_EXISTS(Z4_STOP)
|
||||
#if Z4_STOP_PIN == X_MIN_PIN
|
||||
#define Z4_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE
|
||||
#elif Z4_STOP_PIN == X_MAX_PIN
|
||||
|
@ -1008,6 +1027,7 @@
|
|||
#define Z4_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if !PIN_EXISTS(Z4_MIN)
|
||||
#undef Z4_MIN_PIN
|
||||
#if PIN_EXISTS(Z4_STOP)
|
||||
|
|
Loading…
Reference in a new issue