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,20 +660,22 @@
*/ */
#if ENABLED(X_DUAL_ENDSTOPS) #if ENABLED(X_DUAL_ENDSTOPS)
#if X_HOME_DIR > 0 #if X_HOME_DIR > 0
#if X2_USE_ENDSTOP == _XMIN_ #ifndef X2_MAX_ENDSTOP_INVERTING
#define X2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #if X2_USE_ENDSTOP == _XMIN_
#elif X2_USE_ENDSTOP == _XMAX_ #define X2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#define X2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING #elif X2_USE_ENDSTOP == _XMAX_
#elif X2_USE_ENDSTOP == _YMIN_ #define X2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#define X2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING #elif X2_USE_ENDSTOP == _YMIN_
#elif X2_USE_ENDSTOP == _YMAX_ #define X2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#define X2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING #elif X2_USE_ENDSTOP == _YMAX_
#elif X2_USE_ENDSTOP == _ZMIN_ #define X2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#define X2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING #elif X2_USE_ENDSTOP == _ZMIN_
#elif X2_USE_ENDSTOP == _ZMAX_ #define X2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#define X2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING #elif X2_USE_ENDSTOP == _ZMAX_
#else #define X2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#define X2_MAX_ENDSTOP_INVERTING false #else
#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_
@ -712,23 +714,27 @@
#define X2_MAX_PIN E7_DIAG_PIN #define X2_MAX_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#define X2_MIN_ENDSTOP_INVERTING false #ifndef X2_MIN_ENDSTOP_INVERTING
#else
#if X2_USE_ENDSTOP == _XMIN_
#define X2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif X2_USE_ENDSTOP == _XMAX_
#define X2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#elif X2_USE_ENDSTOP == _YMIN_
#define X2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#elif X2_USE_ENDSTOP == _YMAX_
#define X2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#elif X2_USE_ENDSTOP == _ZMIN_
#define X2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#elif X2_USE_ENDSTOP == _ZMAX_
#define X2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#else
#define X2_MIN_ENDSTOP_INVERTING false #define X2_MIN_ENDSTOP_INVERTING false
#endif #endif
#else
#ifndef X2_MIN_ENDSTOP_INVERTING
#if X2_USE_ENDSTOP == _XMIN_
#define X2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif X2_USE_ENDSTOP == _XMAX_
#define X2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#elif X2_USE_ENDSTOP == _YMIN_
#define X2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#elif X2_USE_ENDSTOP == _YMAX_
#define X2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#elif X2_USE_ENDSTOP == _ZMIN_
#define X2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#elif X2_USE_ENDSTOP == _ZMAX_
#define X2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#else
#define X2_MIN_ENDSTOP_INVERTING false
#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,7 +772,9 @@
#define X2_MIN_PIN E7_DIAG_PIN #define X2_MIN_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#define X2_MAX_ENDSTOP_INVERTING false #ifndef X2_MAX_ENDSTOP_INVERTING
#define X2_MAX_ENDSTOP_INVERTING false
#endif
#endif #endif
#endif #endif
@ -775,20 +783,22 @@
*/ */
#if ENABLED(Y_DUAL_ENDSTOPS) #if ENABLED(Y_DUAL_ENDSTOPS)
#if Y_HOME_DIR > 0 #if Y_HOME_DIR > 0
#if Y2_USE_ENDSTOP == _XMIN_ #ifndef Y2_MAX_ENDSTOP_INVERTING
#define Y2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #if Y2_USE_ENDSTOP == _XMIN_
#elif Y2_USE_ENDSTOP == _XMAX_ #define Y2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#define Y2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING #elif Y2_USE_ENDSTOP == _XMAX_
#elif Y2_USE_ENDSTOP == _YMIN_ #define Y2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#define Y2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING #elif Y2_USE_ENDSTOP == _YMIN_
#elif Y2_USE_ENDSTOP == _YMAX_ #define Y2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#define Y2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING #elif Y2_USE_ENDSTOP == _YMAX_
#elif Y2_USE_ENDSTOP == _ZMIN_ #define Y2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#define Y2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING #elif Y2_USE_ENDSTOP == _ZMIN_
#elif Y2_USE_ENDSTOP == _ZMAX_ #define Y2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#define Y2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING #elif Y2_USE_ENDSTOP == _ZMAX_
#else #define Y2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#define Y2_MAX_ENDSTOP_INVERTING false #else
#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_
@ -827,23 +837,27 @@
#define Y2_MAX_PIN E7_DIAG_PIN #define Y2_MAX_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#define Y2_MIN_ENDSTOP_INVERTING false #ifndef Y2_MIN_ENDSTOP_INVERTING
#else
#if Y2_USE_ENDSTOP == _XMIN_
#define Y2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Y2_USE_ENDSTOP == _XMAX_
#define Y2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#elif Y2_USE_ENDSTOP == _YMIN_
#define Y2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#elif Y2_USE_ENDSTOP == _YMAX_
#define Y2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#elif Y2_USE_ENDSTOP == _ZMIN_
#define Y2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#elif Y2_USE_ENDSTOP == _ZMAX_
#define Y2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#else
#define Y2_MIN_ENDSTOP_INVERTING false #define Y2_MIN_ENDSTOP_INVERTING false
#endif #endif
#else
#ifndef Y2_MIN_ENDSTOP_INVERTING
#if Y2_USE_ENDSTOP == _XMIN_
#define Y2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Y2_USE_ENDSTOP == _XMAX_
#define Y2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#elif Y2_USE_ENDSTOP == _YMIN_
#define Y2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#elif Y2_USE_ENDSTOP == _YMAX_
#define Y2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#elif Y2_USE_ENDSTOP == _ZMIN_
#define Y2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#elif Y2_USE_ENDSTOP == _ZMAX_
#define Y2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#else
#define Y2_MIN_ENDSTOP_INVERTING false
#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,7 +895,9 @@
#define Y2_MIN_PIN E7_DIAG_PIN #define Y2_MIN_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#define Y2_MAX_ENDSTOP_INVERTING false #ifndef Y2_MAX_ENDSTOP_INVERTING
#define Y2_MAX_ENDSTOP_INVERTING false
#endif
#endif #endif
#endif #endif
@ -891,20 +907,22 @@
#if ENABLED(Z_MULTI_ENDSTOPS) #if ENABLED(Z_MULTI_ENDSTOPS)
#if Z_HOME_DIR > 0 #if Z_HOME_DIR > 0
#if Z2_USE_ENDSTOP == _XMIN_ #ifndef Z2_MAX_ENDSTOP_INVERTING
#define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #if Z2_USE_ENDSTOP == _XMIN_
#elif Z2_USE_ENDSTOP == _XMAX_ #define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#define Z2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING #elif Z2_USE_ENDSTOP == _XMAX_
#elif Z2_USE_ENDSTOP == _YMIN_ #define Z2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#define Z2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING #elif Z2_USE_ENDSTOP == _YMIN_
#elif Z2_USE_ENDSTOP == _YMAX_ #define Z2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#define Z2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING #elif Z2_USE_ENDSTOP == _YMAX_
#elif Z2_USE_ENDSTOP == _ZMIN_ #define Z2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#define Z2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING #elif Z2_USE_ENDSTOP == _ZMIN_
#elif Z2_USE_ENDSTOP == _ZMAX_ #define Z2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#define Z2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING #elif Z2_USE_ENDSTOP == _ZMAX_
#else #define Z2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#define Z2_MAX_ENDSTOP_INVERTING false #else
#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_
@ -943,23 +961,27 @@
#define Z2_MAX_PIN E7_DIAG_PIN #define Z2_MAX_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#define Z2_MIN_ENDSTOP_INVERTING false #ifndef Z2_MIN_ENDSTOP_INVERTING
#else
#if Z2_USE_ENDSTOP == _XMIN_
#define Z2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Z2_USE_ENDSTOP == _XMAX_
#define Z2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#elif Z2_USE_ENDSTOP == _YMIN_
#define Z2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#elif Z2_USE_ENDSTOP == _YMAX_
#define Z2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#elif Z2_USE_ENDSTOP == _ZMIN_
#define Z2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#elif Z2_USE_ENDSTOP == _ZMAX_
#define Z2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#else
#define Z2_MIN_ENDSTOP_INVERTING false #define Z2_MIN_ENDSTOP_INVERTING false
#endif #endif
#else
#ifndef Z2_MIN_ENDSTOP_INVERTING
#if Z2_USE_ENDSTOP == _XMIN_
#define Z2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Z2_USE_ENDSTOP == _XMAX_
#define Z2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#elif Z2_USE_ENDSTOP == _YMIN_
#define Z2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#elif Z2_USE_ENDSTOP == _YMAX_
#define Z2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#elif Z2_USE_ENDSTOP == _ZMIN_
#define Z2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#elif Z2_USE_ENDSTOP == _ZMAX_
#define Z2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#else
#define Z2_MIN_ENDSTOP_INVERTING false
#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,25 +1019,29 @@
#define Z2_MIN_PIN E7_DIAG_PIN #define Z2_MIN_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#define Z2_MAX_ENDSTOP_INVERTING false #ifndef Z2_MAX_ENDSTOP_INVERTING
#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
#if Z3_USE_ENDSTOP == _XMIN_ #ifndef Z3_MAX_ENDSTOP_INVERTING
#define Z3_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #if Z3_USE_ENDSTOP == _XMIN_
#elif Z3_USE_ENDSTOP == _XMAX_ #define Z3_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#define Z3_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING #elif Z3_USE_ENDSTOP == _XMAX_
#elif Z3_USE_ENDSTOP == _YMIN_ #define Z3_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#define Z3_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING #elif Z3_USE_ENDSTOP == _YMIN_
#elif Z3_USE_ENDSTOP == _YMAX_ #define Z3_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#define Z3_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING #elif Z3_USE_ENDSTOP == _YMAX_
#elif Z3_USE_ENDSTOP == _ZMIN_ #define Z3_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#define Z3_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING #elif Z3_USE_ENDSTOP == _ZMIN_
#elif Z3_USE_ENDSTOP == _ZMAX_ #define Z3_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#define Z3_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING #elif Z3_USE_ENDSTOP == _ZMAX_
#else #define Z3_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#define Z3_MAX_ENDSTOP_INVERTING false #else
#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_
@ -1054,23 +1080,27 @@
#define Z3_MAX_PIN E7_DIAG_PIN #define Z3_MAX_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#define Z3_MIN_ENDSTOP_INVERTING false #ifndef Z3_MIN_ENDSTOP_INVERTING
#else
#if Z3_USE_ENDSTOP == _XMIN_
#define Z3_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Z3_USE_ENDSTOP == _XMAX_
#define Z3_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#elif Z3_USE_ENDSTOP == _YMIN_
#define Z3_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#elif Z3_USE_ENDSTOP == _YMAX_
#define Z3_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#elif Z3_USE_ENDSTOP == _ZMIN_
#define Z3_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#elif Z3_USE_ENDSTOP == _ZMAX_
#define Z3_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#else
#define Z3_MIN_ENDSTOP_INVERTING false #define Z3_MIN_ENDSTOP_INVERTING false
#endif #endif
#else
#ifndef Z3_MIN_ENDSTOP_INVERTING
#if Z3_USE_ENDSTOP == _XMIN_
#define Z3_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Z3_USE_ENDSTOP == _XMAX_
#define Z3_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#elif Z3_USE_ENDSTOP == _YMIN_
#define Z3_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#elif Z3_USE_ENDSTOP == _YMAX_
#define Z3_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#elif Z3_USE_ENDSTOP == _ZMIN_
#define Z3_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#elif Z3_USE_ENDSTOP == _ZMAX_
#define Z3_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#else
#define Z3_MIN_ENDSTOP_INVERTING false
#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,26 +1138,30 @@
#define Z3_MIN_PIN E7_DIAG_PIN #define Z3_MIN_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#define Z3_MAX_ENDSTOP_INVERTING false #ifndef Z3_MAX_ENDSTOP_INVERTING
#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
#if Z4_USE_ENDSTOP == _XMIN_ #ifndef Z4_MAX_ENDSTOP_INVERTING
#define Z4_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING #if Z4_USE_ENDSTOP == _XMIN_
#elif Z4_USE_ENDSTOP == _XMAX_ #define Z4_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#define Z4_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING #elif Z4_USE_ENDSTOP == _XMAX_
#elif Z4_USE_ENDSTOP == _YMIN_ #define Z4_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#define Z4_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING #elif Z4_USE_ENDSTOP == _YMIN_
#elif Z4_USE_ENDSTOP == _YMAX_ #define Z4_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#define Z4_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING #elif Z4_USE_ENDSTOP == _YMAX_
#elif Z4_USE_ENDSTOP == _ZMIN_ #define Z4_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#define Z4_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING #elif Z4_USE_ENDSTOP == _ZMIN_
#elif Z4_USE_ENDSTOP == _ZMAX_ #define Z4_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#define Z4_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING #elif Z4_USE_ENDSTOP == _ZMAX_
#else #define Z4_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#define Z4_MAX_ENDSTOP_INVERTING false #else
#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_
@ -1166,23 +1200,27 @@
#define Z4_MAX_PIN E7_DIAG_PIN #define Z4_MAX_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#define Z4_MIN_ENDSTOP_INVERTING false #ifndef Z4_MIN_ENDSTOP_INVERTING
#else
#if Z4_USE_ENDSTOP == _XMIN_
#define Z4_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Z4_USE_ENDSTOP == _XMAX_
#define Z4_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#elif Z4_USE_ENDSTOP == _YMIN_
#define Z4_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#elif Z4_USE_ENDSTOP == _YMAX_
#define Z4_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#elif Z4_USE_ENDSTOP == _ZMIN_
#define Z4_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#elif Z4_USE_ENDSTOP == _ZMAX_
#define Z4_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#else
#define Z4_MIN_ENDSTOP_INVERTING false #define Z4_MIN_ENDSTOP_INVERTING false
#endif #endif
#else
#ifndef Z4_MIN_ENDSTOP_INVERTING
#if Z4_USE_ENDSTOP == _XMIN_
#define Z4_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
#elif Z4_USE_ENDSTOP == _XMAX_
#define Z4_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
#elif Z4_USE_ENDSTOP == _YMIN_
#define Z4_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
#elif Z4_USE_ENDSTOP == _YMAX_
#define Z4_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
#elif Z4_USE_ENDSTOP == _ZMIN_
#define Z4_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
#elif Z4_USE_ENDSTOP == _ZMAX_
#define Z4_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
#else
#define Z4_MIN_ENDSTOP_INVERTING false
#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,7 +1258,9 @@
#define Z4_MIN_PIN E7_DIAG_PIN #define Z4_MIN_PIN E7_DIAG_PIN
#endif #endif
#endif #endif
#define Z4_MAX_ENDSTOP_INVERTING false #ifndef Z4_MAX_ENDSTOP_INVERTING
#define Z4_MAX_ENDSTOP_INVERTING false
#endif
#endif #endif
#endif #endif