Allow multiple endstops along with new feature, simplify code
This commit is contained in:
@@ -590,7 +590,7 @@ void Endstops::update() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Z_MIN && !Z_SPI_SENSORLESS && DISABLED(PROBE_ACTIVE_INPUT)
|
||||
#if HAS_Z_MIN && NONE(Z_SPI_SENSORLESS, Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
||||
UPDATE_ENDSTOP_BIT(Z, MIN);
|
||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||
#if HAS_Z2_MIN
|
||||
@@ -615,19 +615,12 @@ void Endstops::update() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// When closing the gap check the enabled probe
|
||||
#if HAS_CUSTOM_PROBE_PIN && DISABLED(PROBE_ACTIVE_INPUT)
|
||||
UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
|
||||
#endif
|
||||
|
||||
#if ENABLED(PROBE_ACTIVE_INPUT)
|
||||
#if HAS_CUSTOM_PROBE_PIN
|
||||
UPDATE_ENDSTOP_BIT(Z, MIN);
|
||||
SET_BIT_TO(live_state, _ENDSTOP(Z, MIN), ((READ(_ENDSTOP_PIN(Z, MIN)) != _ENDSTOP_INVERTING(Z, MIN_PROBE) && (READ(PROBE_ACTIVE_INPUT_PIN) == PROBE_ACTIVE_INPUT_STATE))));
|
||||
#else
|
||||
SET_BIT_TO(live_state, _ENDSTOP(Z, MIN), ((READ(_ENDSTOP_PIN(Z, MIN)) != _ENDSTOP_INVERTING(Z, MIN) && (READ(PROBE_ACTIVE_INPUT_PIN) == PROBE_ACTIVE_INPUT_STATE))));
|
||||
#endif
|
||||
if (READ(PROBE_ACTIVE_INPUT_PIN) == PROBE_ACTIVE_INPUT_STATE)
|
||||
#endif
|
||||
{
|
||||
UPDATE_ENDSTOP_BIT(Z, TERN(HAS_CUSTOM_PROBE_PIN, MIN_PROBE, MIN));
|
||||
}
|
||||
|
||||
#if HAS_Z_MAX && !Z_SPI_SENSORLESS
|
||||
// Check both Z dual endstops
|
||||
|
||||
Reference in New Issue
Block a user