🎨 Misc. probe / endstop cleanup

This commit is contained in:
Scott Lahteine 2021-12-08 18:36:08 -06:00 committed by Scott Lahteine
parent 9871800874
commit f00a0356c7
2 changed files with 7 additions and 7 deletions

View File

@ -561,7 +561,7 @@ void _O2 Endstops::report_states() {
#if HAS_K_MAX
ES_REPORT(K_MAX);
#endif
#if BOTH(MARLIN_DEV_MODE, PROBE_ACTIVATION_SWITCH)
#if BOTH(PROBE_ACTIVATION_SWITCH)
print_es_state(probe_switch_activated(), F(STR_PROBE_EN));
#endif
#if USES_Z_MIN_PROBE_PIN

View File

@ -496,10 +496,10 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) {
#if ENABLED(SENSORLESS_PROBING)
sensorless_t stealth_states { false };
#if HAS_DELTA_SENSORLESS_PROBING
if (probe.test_sensitivity.x) stealth_states.x = tmc_enable_stallguard(stepperX); // Delta watches all DIAG pins for a stall
if (probe.test_sensitivity.y) stealth_states.y = tmc_enable_stallguard(stepperY);
if (test_sensitivity.x) stealth_states.x = tmc_enable_stallguard(stepperX); // Delta watches all DIAG pins for a stall
if (test_sensitivity.y) stealth_states.y = tmc_enable_stallguard(stepperY);
#endif
if (probe.test_sensitivity.z) stealth_states.z = tmc_enable_stallguard(stepperZ); // All machines will check Z-DIAG for stall
if (test_sensitivity.z) stealth_states.z = tmc_enable_stallguard(stepperZ); // All machines will check Z-DIAG for stall
endstops.enable(true);
set_homing_current(true); // The "homing" current also applies to probing
#endif
@ -524,10 +524,10 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) {
#if ENABLED(SENSORLESS_PROBING)
endstops.not_homing();
#if HAS_DELTA_SENSORLESS_PROBING
if (probe.test_sensitivity.x) tmc_disable_stallguard(stepperX, stealth_states.x);
if (probe.test_sensitivity.y) tmc_disable_stallguard(stepperY, stealth_states.y);
if (test_sensitivity.x) tmc_disable_stallguard(stepperX, stealth_states.x);
if (test_sensitivity.y) tmc_disable_stallguard(stepperY, stealth_states.y);
#endif
if (probe.test_sensitivity.z) tmc_disable_stallguard(stepperZ, stealth_states.z);
if (test_sensitivity.z) tmc_disable_stallguard(stepperZ, stealth_states.z);
set_homing_current(false);
#endif