|
@ -493,7 +493,7 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) { |
|
|
// Disable stealthChop if used. Enable diag1 pin on driver.
|
|
|
// Disable stealthChop if used. Enable diag1 pin on driver.
|
|
|
#if ENABLED(SENSORLESS_PROBING) |
|
|
#if ENABLED(SENSORLESS_PROBING) |
|
|
sensorless_t stealth_states { false }; |
|
|
sensorless_t stealth_states { false }; |
|
|
#if ENABLED(DELTA) |
|
|
#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.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 (probe.test_sensitivity.y) stealth_states.y = tmc_enable_stallguard(stepperY); |
|
|
#endif |
|
|
#endif |
|
@ -509,7 +509,7 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) { |
|
|
|
|
|
|
|
|
// Check to see if the probe was triggered
|
|
|
// Check to see if the probe was triggered
|
|
|
const bool probe_triggered = |
|
|
const bool probe_triggered = |
|
|
#if BOTH(DELTA, SENSORLESS_PROBING) |
|
|
#if HAS_DELTA_SENSORLESS_PROBING |
|
|
endstops.trigger_state() & (_BV(X_MAX) | _BV(Y_MAX) | _BV(Z_MAX)) |
|
|
endstops.trigger_state() & (_BV(X_MAX) | _BV(Y_MAX) | _BV(Z_MAX)) |
|
|
#else |
|
|
#else |
|
|
TEST(endstops.trigger_state(), Z_MIN_PROBE) |
|
|
TEST(endstops.trigger_state(), Z_MIN_PROBE) |
|
@ -521,7 +521,7 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) { |
|
|
// Re-enable stealthChop if used. Disable diag1 pin on driver.
|
|
|
// Re-enable stealthChop if used. Disable diag1 pin on driver.
|
|
|
#if ENABLED(SENSORLESS_PROBING) |
|
|
#if ENABLED(SENSORLESS_PROBING) |
|
|
endstops.not_homing(); |
|
|
endstops.not_homing(); |
|
|
#if ENABLED(DELTA) |
|
|
#if HAS_DELTA_SENSORLESS_PROBING |
|
|
if (probe.test_sensitivity.x) tmc_disable_stallguard(stepperX, stealth_states.x); |
|
|
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 (probe.test_sensitivity.y) tmc_disable_stallguard(stepperY, stealth_states.y); |
|
|
#endif |
|
|
#endif |
|
@ -765,7 +765,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// On delta keep Z below clip height or do_blocking_move_to will abort
|
|
|
// On delta keep Z below clip height or do_blocking_move_to will abort
|
|
|
xyz_pos_t npos = { rx, ry, _MIN(TERN(DELTA, delta_clip_start_height, current_position.z), current_position.z) }; |
|
|
xyz_pos_t npos = { rx, ry, TERN(DELTA, _MIN(delta_clip_start_height, current_position.z), current_position.z) }; |
|
|
if (probe_relative) { // The given position is in terms of the probe
|
|
|
if (probe_relative) { // The given position is in terms of the probe
|
|
|
if (!can_reach(npos)) { |
|
|
if (!can_reach(npos)) { |
|
|
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Position Not Reachable"); |
|
|
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Position Not Reachable"); |
|
@ -827,7 +827,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai |
|
|
*/ |
|
|
*/ |
|
|
void Probe::enable_stallguard_diag1() { |
|
|
void Probe::enable_stallguard_diag1() { |
|
|
#if ENABLED(SENSORLESS_PROBING) |
|
|
#if ENABLED(SENSORLESS_PROBING) |
|
|
#if ENABLED(DELTA) |
|
|
#if HAS_DELTA_SENSORLESS_PROBING |
|
|
stealth_states.x = tmc_enable_stallguard(stepperX); |
|
|
stealth_states.x = tmc_enable_stallguard(stepperX); |
|
|
stealth_states.y = tmc_enable_stallguard(stepperY); |
|
|
stealth_states.y = tmc_enable_stallguard(stepperY); |
|
|
#endif |
|
|
#endif |
|
@ -842,7 +842,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai |
|
|
void Probe::disable_stallguard_diag1() { |
|
|
void Probe::disable_stallguard_diag1() { |
|
|
#if ENABLED(SENSORLESS_PROBING) |
|
|
#if ENABLED(SENSORLESS_PROBING) |
|
|
endstops.not_homing(); |
|
|
endstops.not_homing(); |
|
|
#if ENABLED(DELTA) |
|
|
#if HAS_DELTA_SENSORLESS_PROBING |
|
|
tmc_disable_stallguard(stepperX, stealth_states.x); |
|
|
tmc_disable_stallguard(stepperX, stealth_states.x); |
|
|
tmc_disable_stallguard(stepperY, stealth_states.y); |
|
|
tmc_disable_stallguard(stepperY, stealth_states.y); |
|
|
#endif |
|
|
#endif |
|
@ -907,6 +907,6 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#endif // SENSORLESS_PROBING
|
|
|
#endif // SENSORLESS_PROBING || SENSORLESS_HOMING
|
|
|
|
|
|
|
|
|
#endif // HAS_BED_PROBE
|
|
|
#endif // HAS_BED_PROBE
|
|
|