Permit independent X2,Y2,Z2,Z3,Z4 endstop inverting (#18481)

This commit is contained in:
Robby Candra 2020-07-01 13:22:34 +07:00 committed by GitHub
parent d7e06198c5
commit 39105384ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -660,6 +660,7 @@
*/ */
#if ENABLED(X_DUAL_ENDSTOPS) #if ENABLED(X_DUAL_ENDSTOPS)
#if X_HOME_DIR > 0 #if X_HOME_DIR > 0
#ifndef X2_MAX_ENDSTOP_INVERTING
#if X2_USE_ENDSTOP == _XMIN_ #if X2_USE_ENDSTOP == _XMIN_
#define X2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #define X2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif X2_USE_ENDSTOP == _XMAX_ #elif X2_USE_ENDSTOP == _XMAX_
@ -675,6 +676,7 @@
#else #else
#define X2_MAX_ENDSTOP_INVERTING false #define X2_MAX_ENDSTOP_INVERTING false
#endif #endif
#endif
#ifndef X2_MAX_PIN #ifndef X2_MAX_PIN
#if X2_USE_ENDSTOP == _XMIN_ #if X2_USE_ENDSTOP == _XMIN_
#define X2_MAX_PIN X_MIN_PIN #define X2_MAX_PIN X_MIN_PIN
@ -712,8 +714,11 @@
#define X2_MAX_PIN E7_DIAG_PIN #define X2_MAX_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#ifndef X2_MIN_ENDSTOP_INVERTING
#define X2_MIN_ENDSTOP_INVERTING false #define X2_MIN_ENDSTOP_INVERTING false
#endif
#else #else
#ifndef X2_MIN_ENDSTOP_INVERTING
#if X2_USE_ENDSTOP == _XMIN_ #if X2_USE_ENDSTOP == _XMIN_
#define X2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #define X2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif X2_USE_ENDSTOP == _XMAX_ #elif X2_USE_ENDSTOP == _XMAX_
@ -729,6 +734,7 @@
#else #else
#define X2_MIN_ENDSTOP_INVERTING false #define X2_MIN_ENDSTOP_INVERTING false
#endif #endif
#endif
#ifndef X2_MIN_PIN #ifndef X2_MIN_PIN
#if X2_USE_ENDSTOP == _XMIN_ #if X2_USE_ENDSTOP == _XMIN_
#define X2_MIN_PIN X_MIN_PIN #define X2_MIN_PIN X_MIN_PIN
@ -766,8 +772,10 @@
#define X2_MIN_PIN E7_DIAG_PIN #define X2_MIN_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#ifndef X2_MAX_ENDSTOP_INVERTING
#define X2_MAX_ENDSTOP_INVERTING false #define X2_MAX_ENDSTOP_INVERTING false
#endif #endif
#endif
#endif #endif
/** /**
@ -775,6 +783,7 @@
*/ */
#if ENABLED(Y_DUAL_ENDSTOPS) #if ENABLED(Y_DUAL_ENDSTOPS)
#if Y_HOME_DIR > 0 #if Y_HOME_DIR > 0
#ifndef Y2_MAX_ENDSTOP_INVERTING
#if Y2_USE_ENDSTOP == _XMIN_ #if Y2_USE_ENDSTOP == _XMIN_
#define Y2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #define Y2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Y2_USE_ENDSTOP == _XMAX_ #elif Y2_USE_ENDSTOP == _XMAX_
@ -790,6 +799,7 @@
#else #else
#define Y2_MAX_ENDSTOP_INVERTING false #define Y2_MAX_ENDSTOP_INVERTING false
#endif #endif
#endif
#ifndef Y2_MAX_PIN #ifndef Y2_MAX_PIN
#if Y2_USE_ENDSTOP == _XMIN_ #if Y2_USE_ENDSTOP == _XMIN_
#define Y2_MAX_PIN X_MIN_PIN #define Y2_MAX_PIN X_MIN_PIN
@ -827,8 +837,11 @@
#define Y2_MAX_PIN E7_DIAG_PIN #define Y2_MAX_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#ifndef Y2_MIN_ENDSTOP_INVERTING
#define Y2_MIN_ENDSTOP_INVERTING false #define Y2_MIN_ENDSTOP_INVERTING false
#endif
#else #else
#ifndef Y2_MIN_ENDSTOP_INVERTING
#if Y2_USE_ENDSTOP == _XMIN_ #if Y2_USE_ENDSTOP == _XMIN_
#define Y2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #define Y2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Y2_USE_ENDSTOP == _XMAX_ #elif Y2_USE_ENDSTOP == _XMAX_
@ -844,6 +857,7 @@
#else #else
#define Y2_MIN_ENDSTOP_INVERTING false #define Y2_MIN_ENDSTOP_INVERTING false
#endif #endif
#endif
#ifndef Y2_MIN_PIN #ifndef Y2_MIN_PIN
#if Y2_USE_ENDSTOP == _XMIN_ #if Y2_USE_ENDSTOP == _XMIN_
#define Y2_MIN_PIN X_MIN_PIN #define Y2_MIN_PIN X_MIN_PIN
@ -881,8 +895,10 @@
#define Y2_MIN_PIN E7_DIAG_PIN #define Y2_MIN_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#ifndef Y2_MAX_ENDSTOP_INVERTING
#define Y2_MAX_ENDSTOP_INVERTING false #define Y2_MAX_ENDSTOP_INVERTING false
#endif #endif
#endif
#endif #endif
/** /**
@ -891,6 +907,7 @@
#if ENABLED(Z_MULTI_ENDSTOPS) #if ENABLED(Z_MULTI_ENDSTOPS)
#if Z_HOME_DIR > 0 #if Z_HOME_DIR > 0
#ifndef Z2_MAX_ENDSTOP_INVERTING
#if Z2_USE_ENDSTOP == _XMIN_ #if Z2_USE_ENDSTOP == _XMIN_
#define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Z2_USE_ENDSTOP == _XMAX_ #elif Z2_USE_ENDSTOP == _XMAX_
@ -906,6 +923,7 @@
#else #else
#define Z2_MAX_ENDSTOP_INVERTING false #define Z2_MAX_ENDSTOP_INVERTING false
#endif #endif
#endif
#ifndef Z2_MAX_PIN #ifndef Z2_MAX_PIN
#if Z2_USE_ENDSTOP == _XMIN_ #if Z2_USE_ENDSTOP == _XMIN_
#define Z2_MAX_PIN X_MIN_PIN #define Z2_MAX_PIN X_MIN_PIN
@ -943,8 +961,11 @@
#define Z2_MAX_PIN E7_DIAG_PIN #define Z2_MAX_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#ifndef Z2_MIN_ENDSTOP_INVERTING
#define Z2_MIN_ENDSTOP_INVERTING false #define Z2_MIN_ENDSTOP_INVERTING false
#endif
#else #else
#ifndef Z2_MIN_ENDSTOP_INVERTING
#if Z2_USE_ENDSTOP == _XMIN_ #if Z2_USE_ENDSTOP == _XMIN_
#define Z2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #define Z2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Z2_USE_ENDSTOP == _XMAX_ #elif Z2_USE_ENDSTOP == _XMAX_
@ -960,6 +981,7 @@
#else #else
#define Z2_MIN_ENDSTOP_INVERTING false #define Z2_MIN_ENDSTOP_INVERTING false
#endif #endif
#endif
#ifndef Z2_MIN_PIN #ifndef Z2_MIN_PIN
#if Z2_USE_ENDSTOP == _XMIN_ #if Z2_USE_ENDSTOP == _XMIN_
#define Z2_MIN_PIN X_MIN_PIN #define Z2_MIN_PIN X_MIN_PIN
@ -997,11 +1019,14 @@
#define Z2_MIN_PIN E7_DIAG_PIN #define Z2_MIN_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#ifndef Z2_MAX_ENDSTOP_INVERTING
#define Z2_MAX_ENDSTOP_INVERTING false #define Z2_MAX_ENDSTOP_INVERTING false
#endif #endif
#endif
#if NUM_Z_STEPPER_DRIVERS >= 3 #if NUM_Z_STEPPER_DRIVERS >= 3
#if Z_HOME_DIR > 0 #if Z_HOME_DIR > 0
#ifndef Z3_MAX_ENDSTOP_INVERTING
#if Z3_USE_ENDSTOP == _XMIN_ #if Z3_USE_ENDSTOP == _XMIN_
#define Z3_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #define Z3_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Z3_USE_ENDSTOP == _XMAX_ #elif Z3_USE_ENDSTOP == _XMAX_
@ -1017,6 +1042,7 @@
#else #else
#define Z3_MAX_ENDSTOP_INVERTING false #define Z3_MAX_ENDSTOP_INVERTING false
#endif #endif
#endif
#ifndef Z3_MAX_PIN #ifndef Z3_MAX_PIN
#if Z3_USE_ENDSTOP == _XMIN_ #if Z3_USE_ENDSTOP == _XMIN_
#define Z3_MAX_PIN X_MIN_PIN #define Z3_MAX_PIN X_MIN_PIN
@ -1054,8 +1080,11 @@
#define Z3_MAX_PIN E7_DIAG_PIN #define Z3_MAX_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#ifndef Z3_MIN_ENDSTOP_INVERTING
#define Z3_MIN_ENDSTOP_INVERTING false #define Z3_MIN_ENDSTOP_INVERTING false
#endif
#else #else
#ifndef Z3_MIN_ENDSTOP_INVERTING
#if Z3_USE_ENDSTOP == _XMIN_ #if Z3_USE_ENDSTOP == _XMIN_
#define Z3_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #define Z3_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Z3_USE_ENDSTOP == _XMAX_ #elif Z3_USE_ENDSTOP == _XMAX_
@ -1071,6 +1100,7 @@
#else #else
#define Z3_MIN_ENDSTOP_INVERTING false #define Z3_MIN_ENDSTOP_INVERTING false
#endif #endif
#endif
#ifndef Z3_MIN_PIN #ifndef Z3_MIN_PIN
#if Z3_USE_ENDSTOP == _XMIN_ #if Z3_USE_ENDSTOP == _XMIN_
#define Z3_MIN_PIN X_MIN_PIN #define Z3_MIN_PIN X_MIN_PIN
@ -1108,12 +1138,15 @@
#define Z3_MIN_PIN E7_DIAG_PIN #define Z3_MIN_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#ifndef Z3_MAX_ENDSTOP_INVERTING
#define Z3_MAX_ENDSTOP_INVERTING false #define Z3_MAX_ENDSTOP_INVERTING false
#endif #endif
#endif #endif
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4 #if NUM_Z_STEPPER_DRIVERS >= 4
#if Z_HOME_DIR > 0 #if Z_HOME_DIR > 0
#ifndef Z4_MAX_ENDSTOP_INVERTING
#if Z4_USE_ENDSTOP == _XMIN_ #if Z4_USE_ENDSTOP == _XMIN_
#define Z4_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #define Z4_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Z4_USE_ENDSTOP == _XMAX_ #elif Z4_USE_ENDSTOP == _XMAX_
@ -1129,6 +1162,7 @@
#else #else
#define Z4_MAX_ENDSTOP_INVERTING false #define Z4_MAX_ENDSTOP_INVERTING false
#endif #endif
#endif
#ifndef Z4_MAX_PIN #ifndef Z4_MAX_PIN
#if Z4_USE_ENDSTOP == _XMIN_ #if Z4_USE_ENDSTOP == _XMIN_
#define Z4_MAX_PIN X_MIN_PIN #define Z4_MAX_PIN X_MIN_PIN
@ -1166,8 +1200,11 @@
#define Z4_MAX_PIN E7_DIAG_PIN #define Z4_MAX_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#ifndef Z4_MIN_ENDSTOP_INVERTING
#define Z4_MIN_ENDSTOP_INVERTING false #define Z4_MIN_ENDSTOP_INVERTING false
#endif
#else #else
#ifndef Z4_MIN_ENDSTOP_INVERTING
#if Z4_USE_ENDSTOP == _XMIN_ #if Z4_USE_ENDSTOP == _XMIN_
#define Z4_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #define Z4_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Z4_USE_ENDSTOP == _XMAX_ #elif Z4_USE_ENDSTOP == _XMAX_
@ -1183,6 +1220,7 @@
#else #else
#define Z4_MIN_ENDSTOP_INVERTING false #define Z4_MIN_ENDSTOP_INVERTING false
#endif #endif
#endif
#ifndef Z4_MIN_PIN #ifndef Z4_MIN_PIN
#if Z4_USE_ENDSTOP == _XMIN_ #if Z4_USE_ENDSTOP == _XMIN_
#define Z4_MIN_PIN X_MIN_PIN #define Z4_MIN_PIN X_MIN_PIN
@ -1220,9 +1258,11 @@
#define Z4_MIN_PIN E7_DIAG_PIN #define Z4_MIN_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#ifndef Z4_MAX_ENDSTOP_INVERTING
#define Z4_MAX_ENDSTOP_INVERTING false #define Z4_MAX_ENDSTOP_INVERTING false
#endif #endif
#endif #endif
#endif
#endif // Z_MULTI_ENDSTOPS #endif // Z_MULTI_ENDSTOPS