🐛 Fix up endstop flags (#22487, #22525)

This commit is contained in:
Scott Lahteine 2021-08-02 17:08:35 -05:00
parent 83b8a0f2ac
commit a36a6685ae
4 changed files with 18 additions and 26 deletions

View file

@ -2495,16 +2495,16 @@
#if _HAS_STOP(X,MAX) #if _HAS_STOP(X,MAX)
#define HAS_X_MAX 1 #define HAS_X_MAX 1
#endif #endif
#if HAS_Y_AXIS && _HAS_STOP(Y,MIN) #if _HAS_STOP(Y,MIN)
#define HAS_Y_MIN 1 #define HAS_Y_MIN 1
#endif #endif
#if HAS_Y_AXIS && _HAS_STOP(Y,MAX) #if _HAS_STOP(Y,MAX)
#define HAS_Y_MAX 1 #define HAS_Y_MAX 1
#endif #endif
#if BOTH(HAS_Z_AXIS, USE_ZMIN_PLUG) && _HAS_STOP(Z,MIN) #if _HAS_STOP(Z,MIN)
#define HAS_Z_MIN 1 #define HAS_Z_MIN 1
#endif #endif
#if BOTH(HAS_Z_AXIS, USE_ZMAX_PLUG) && _HAS_STOP(Z,MAX) #if _HAS_STOP(Z,MAX)
#define HAS_Z_MAX 1 #define HAS_Z_MAX 1
#endif #endif
#if _HAS_STOP(I,MIN) #if _HAS_STOP(I,MIN)
@ -2555,10 +2555,12 @@
#if PIN_EXISTS(Z4_MAX) #if PIN_EXISTS(Z4_MAX)
#define HAS_Z4_MAX 1 #define HAS_Z4_MAX 1
#endif #endif
#if HAS_BED_PROBE && PIN_EXISTS(Z_MIN_PROBE) #if HAS_BED_PROBE && PIN_EXISTS(Z_MIN_PROBE)
#define HAS_Z_MIN_PROBE_PIN 1 #define HAS_Z_MIN_PROBE_PIN 1
#endif #endif
#undef _HAS_STOP
#undef IS_PROBE_PIN #undef IS_PROBE_PIN
#undef IS_X2_ENDSTOP #undef IS_X2_ENDSTOP
#undef IS_Y2_ENDSTOP #undef IS_Y2_ENDSTOP

View file

@ -47,26 +47,16 @@ enum EndstopEnum : char {
_ES_ITEM(HAS_K_MAX, K_MAX) _ES_ITEM(HAS_K_MAX, K_MAX)
// Extra Endstops for XYZ // Extra Endstops for XYZ
#if ENABLED(X_DUAL_ENDSTOPS) _ES_ITEM(HAS_X2_MIN, X2_MIN)
_ES_ITEM(HAS_X_MIN, X2_MIN) _ES_ITEM(HAS_X2_MAX, X2_MAX)
_ES_ITEM(HAS_X_MAX, X2_MAX) _ES_ITEM(HAS_Y2_MIN, Y2_MIN)
#endif _ES_ITEM(HAS_Y2_MAX, Y2_MAX)
#if ENABLED(Y_DUAL_ENDSTOPS) _ES_ITEM(HAS_Z2_MIN, Z2_MIN)
_ES_ITEM(HAS_Y_MIN, Y2_MIN) _ES_ITEM(HAS_Z2_MAX, Z2_MAX)
_ES_ITEM(HAS_Y_MAX, Y2_MAX) _ES_ITEM(HAS_Z3_MIN, Z3_MIN)
#endif _ES_ITEM(HAS_Z3_MAX, Z3_MAX)
#if ENABLED(Z_MULTI_ENDSTOPS) _ES_ITEM(HAS_Z4_MIN, Z4_MIN)
_ES_ITEM(HAS_Z_MIN, Z2_MIN) _ES_ITEM(HAS_Z4_MAX, Z4_MAX)
_ES_ITEM(HAS_Z_MAX, Z2_MAX)
#if NUM_Z_STEPPER_DRIVERS >= 3
_ES_ITEM(HAS_Z_MIN, Z3_MIN)
_ES_ITEM(HAS_Z_MAX, Z3_MAX)
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4
_ES_ITEM(HAS_Z_MIN, Z4_MIN)
_ES_ITEM(HAS_Z_MAX, Z4_MAX)
#endif
#endif
// Bed Probe state is distinct or shared with Z_MIN (i.e., when the probe is the only Z endstop) // Bed Probe state is distinct or shared with Z_MIN (i.e., when the probe is the only Z endstop)
_ES_ITEM(HAS_BED_PROBE, Z_MIN_PROBE IF_DISABLED(USES_Z_MIN_PROBE_PIN, = Z_MIN)) _ES_ITEM(HAS_BED_PROBE, Z_MIN_PROBE IF_DISABLED(USES_Z_MIN_PROBE_PIN, = Z_MIN))

View file

@ -101,7 +101,7 @@ exec_test $1 $2 "Teensy 3.5/3.6 COREXZ | BACKLASH" "$3"
# Enable Dual Z with Dual Z endstops # Enable Dual Z with Dual Z endstops
# #
restore_configs restore_configs
opt_set MOTHERBOARD BOARD_TEENSY35_36 NUM_Z_STEPPER_DRIVERS 2 Z2_MAX_PIN 2 opt_set MOTHERBOARD BOARD_TEENSY35_36 NUM_Z_STEPPER_DRIVERS 2 Z2_MIN_PIN 2
opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG
pins_set ramps/RAMPS X_MAX_PIN -1 pins_set ramps/RAMPS X_MAX_PIN -1
exec_test $1 $2 "Dual Z with Dual Z endstops" "$3" exec_test $1 $2 "Dual Z with Dual Z endstops" "$3"

View file

@ -104,7 +104,7 @@ exec_test $1 $2 "Teensy 4.0/4.1 COREXZ" "$3"
# Enable Dual Z with Dual Z endstops # Enable Dual Z with Dual Z endstops
# #
restore_configs restore_configs
opt_set MOTHERBOARD BOARD_TEENSY41 NUM_Z_STEPPER_DRIVERS 2 Z2_MAX_PIN 2 opt_set MOTHERBOARD BOARD_TEENSY41 NUM_Z_STEPPER_DRIVERS 2 Z2_MIN_PIN 2
opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG
pins_set ramps/RAMPS X_MAX_PIN -1 pins_set ramps/RAMPS X_MAX_PIN -1
exec_test $1 $2 "Dual Z with Dual Z endstops" "$3" exec_test $1 $2 "Dual Z with Dual Z endstops" "$3"