Skip to content

Commit

Permalink
🎨 Misc. probe / endstop cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Dec 9, 2021
1 parent 1356830 commit 4d45fdf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/module/endstops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,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)

This comment has been minimized.

Copy link
@frogamic

frogamic Dec 9, 2021

@thinkyhead This breaks my build, the BOTH macro expects 2 arguments

Marlin/src/module/endstops.cpp:567:35: error: macro "BOTH" requires 2 arguments, but only 1 given
  567 |   #if BOTH(PROBE_ACTIVATION_SWITCH)
print_es_state(probe_switch_activated(), F(STR_PROBE_EN));
#endif
#if USES_Z_MIN_PROBE_PIN
Expand Down
12 changes: 6 additions & 6 deletions Marlin/src/module/probe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 4d45fdf

Please sign in to comment.