|
|
@ -228,7 +228,7 @@ void Endstops::init() {
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
|
|
|
|
#if USES_Z_MIN_PROBE_ENDSTOP
|
|
|
|
#if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE)
|
|
|
|
#if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE)
|
|
|
|
SET_INPUT_PULLUP(Z_MIN_PROBE_PIN);
|
|
|
|
SET_INPUT_PULLUP(Z_MIN_PROBE_PIN);
|
|
|
|
#elif ENABLED(ENDSTOPPULLDOWN_ZMIN_PROBE)
|
|
|
|
#elif ENABLED(ENDSTOPPULLDOWN_ZMIN_PROBE)
|
|
|
@ -351,7 +351,7 @@ void Endstops::event_handler() {
|
|
|
|
ENDSTOP_HIT_TEST_Y();
|
|
|
|
ENDSTOP_HIT_TEST_Y();
|
|
|
|
ENDSTOP_HIT_TEST_Z();
|
|
|
|
ENDSTOP_HIT_TEST_Z();
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
|
|
|
|
#if USES_Z_MIN_PROBE_ENDSTOP
|
|
|
|
#define P_AXIS Z_AXIS
|
|
|
|
#define P_AXIS Z_AXIS
|
|
|
|
if (TEST(hit_state, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P');
|
|
|
|
if (TEST(hit_state, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P');
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -425,7 +425,7 @@ void _O2 Endstops::M119() {
|
|
|
|
#if HAS_Z3_MAX
|
|
|
|
#if HAS_Z3_MAX
|
|
|
|
ES_REPORT(Z3_MAX);
|
|
|
|
ES_REPORT(Z3_MAX);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
|
|
|
|
#if USES_Z_MIN_PROBE_ENDSTOP
|
|
|
|
print_es_state(READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING, PSTR(MSG_Z_PROBE));
|
|
|
|
print_es_state(READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING, PSTR(MSG_Z_PROBE));
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#if HAS_FILAMENT_SENSOR
|
|
|
|
#if HAS_FILAMENT_SENSOR
|
|
|
@ -586,7 +586,7 @@ void Endstops::update() {
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// When closing the gap check the enabled probe
|
|
|
|
// When closing the gap check the enabled probe
|
|
|
|
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
|
|
|
|
#if USES_Z_MIN_PROBE_ENDSTOP
|
|
|
|
UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
|
|
|
|
UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
@ -606,7 +606,7 @@ void Endstops::update() {
|
|
|
|
COPY_LIVE_STATE(Z_MAX, Z3_MAX);
|
|
|
|
COPY_LIVE_STATE(Z_MAX, Z3_MAX);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#elif DISABLED(Z_MIN_PROBE_ENDSTOP) || Z_MAX_PIN != Z_MIN_PROBE_PIN
|
|
|
|
#elif !USES_Z_MIN_PROBE_ENDSTOP || Z_MAX_PIN != Z_MIN_PROBE_PIN
|
|
|
|
// If this pin isn't the bed probe it's the Z endstop
|
|
|
|
// If this pin isn't the bed probe it's the Z endstop
|
|
|
|
UPDATE_ENDSTOP_BIT(Z, MAX);
|
|
|
|
UPDATE_ENDSTOP_BIT(Z, MAX);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -736,7 +736,7 @@ void Endstops::update() {
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
|
|
|
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
|
|
|
if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN);
|
|
|
|
if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN);
|
|
|
|
#elif ENABLED(Z_MIN_PROBE_ENDSTOP)
|
|
|
|
#elif USES_Z_MIN_PROBE_ENDSTOP
|
|
|
|
if (!z_probe_enabled) PROCESS_ENDSTOP(Z, MIN);
|
|
|
|
if (!z_probe_enabled) PROCESS_ENDSTOP(Z, MIN);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
PROCESS_ENDSTOP(Z, MIN);
|
|
|
|
PROCESS_ENDSTOP(Z, MIN);
|
|
|
@ -745,7 +745,7 @@ void Endstops::update() {
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// When closing the gap check the enabled probe
|
|
|
|
// When closing the gap check the enabled probe
|
|
|
|
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
|
|
|
|
#if USES_Z_MIN_PROBE_ENDSTOP
|
|
|
|
if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN_PROBE);
|
|
|
|
if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN_PROBE);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -755,7 +755,7 @@ void Endstops::update() {
|
|
|
|
PROCESS_TRIPLE_ENDSTOP(Z, Z2, Z3, MAX);
|
|
|
|
PROCESS_TRIPLE_ENDSTOP(Z, Z2, Z3, MAX);
|
|
|
|
#elif ENABLED(Z_DUAL_ENDSTOPS)
|
|
|
|
#elif ENABLED(Z_DUAL_ENDSTOPS)
|
|
|
|
PROCESS_DUAL_ENDSTOP(Z, Z2, MAX);
|
|
|
|
PROCESS_DUAL_ENDSTOP(Z, Z2, MAX);
|
|
|
|
#elif DISABLED(Z_MIN_PROBE_ENDSTOP) || Z_MAX_PIN != Z_MIN_PROBE_PIN
|
|
|
|
#elif !USES_Z_MIN_PROBE_ENDSTOP || Z_MAX_PIN != Z_MIN_PROBE_PIN
|
|
|
|
// If this pin is not hijacked for the bed probe
|
|
|
|
// If this pin is not hijacked for the bed probe
|
|
|
|
// then it belongs to the Z endstop
|
|
|
|
// then it belongs to the Z endstop
|
|
|
|
PROCESS_ENDSTOP(Z, MAX);
|
|
|
|
PROCESS_ENDSTOP(Z, MAX);
|
|
|
|