Probe Tare, Probe Activation Switch (#20379)
Co-authored-by: Scott Lahteine <github@thinkyhead.com> Co-authored-by: Victor Mateus Oliveira <rhapsodyv@gmail.com> Co-authored-by: Jason Smith <jason.inet@gmail.com>
This commit is contained in:
committed by
GitHub
parent
7a168205eb
commit
2963229dfa
@@ -280,6 +280,12 @@ void Endstops::init() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(PROBE_ACTIVATION_SWITCH)
|
||||
SET_INPUT(PROBE_ACTIVATION_SWITCH_PIN);
|
||||
#endif
|
||||
|
||||
TERN_(PROBE_TARE, probe.tare());
|
||||
|
||||
TERN_(ENDSTOP_INTERRUPTS_FEATURE, setup_endstop_interrupts());
|
||||
|
||||
// Enable endstops
|
||||
@@ -458,6 +464,9 @@ void _O2 Endstops::report_states() {
|
||||
#if HAS_Z4_MAX
|
||||
ES_REPORT(Z4_MAX);
|
||||
#endif
|
||||
#if BOTH(MARLIN_DEV_MODE, PROBE_ACTIVATION_SWITCH)
|
||||
print_es_state(READ(PROBE_ACTIVATION_SWITCH_PIN) == PROBE_ACTIVATION_SWITCH_STATE, PSTR(STR_PROBE_EN));
|
||||
#endif
|
||||
#if HAS_CUSTOM_PROBE_PIN
|
||||
print_es_state(PROBE_TRIGGERED(), PSTR(STR_Z_PROBE));
|
||||
#endif
|
||||
@@ -582,7 +591,7 @@ void Endstops::update() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Z_MIN && !Z_SPI_SENSORLESS
|
||||
#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
|
||||
@@ -607,9 +616,13 @@ void Endstops::update() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// When closing the gap check the enabled probe
|
||||
#if HAS_CUSTOM_PROBE_PIN
|
||||
UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
|
||||
#if HAS_BED_PROBE
|
||||
// When closing the gap check the enabled probe
|
||||
if (true
|
||||
#if ENABLED(PROBE_ACTIVATION_SWITCH)
|
||||
|| READ(PROBE_ACTIVATION_SWITCH_PIN) == PROBE_ACTIVATION_SWITCH_STATE
|
||||
#endif
|
||||
) UPDATE_ENDSTOP_BIT(Z, TERN(HAS_CUSTOM_PROBE_PIN, MIN_PROBE, MIN));
|
||||
#endif
|
||||
|
||||
#if HAS_Z_MAX && !Z_SPI_SENSORLESS
|
||||
|
||||
Reference in New Issue
Block a user