🎨 Apply more HAS_DELTA_SENSORLESS_PROBING
This commit is contained in:
parent
d6a87aa75b
commit
17c9450f0c
|
@ -425,7 +425,7 @@ void GcodeSuite::G33() {
|
||||||
|
|
||||||
const bool stow_after_each = parser.seen_test('E');
|
const bool stow_after_each = parser.seen_test('E');
|
||||||
|
|
||||||
#if ENABLED(SENSORLESS_PROBING)
|
#if HAS_DELTA_SENSORLESS_PROBING
|
||||||
probe.test_sensitivity.x = !parser.seen_test('X');
|
probe.test_sensitivity.x = !parser.seen_test('X');
|
||||||
TERN_(HAS_Y_AXIS, probe.test_sensitivity.y = !parser.seen_test('Y'));
|
TERN_(HAS_Y_AXIS, probe.test_sensitivity.y = !parser.seen_test('Y'));
|
||||||
TERN_(HAS_Z_AXIS, probe.test_sensitivity.z = !parser.seen_test('Z'));
|
TERN_(HAS_Z_AXIS, probe.test_sensitivity.z = !parser.seen_test('Z'));
|
||||||
|
|
|
@ -254,7 +254,7 @@ void home_delta() {
|
||||||
current_position.z = DIFF_TERN(HAS_BED_PROBE, delta_height + 10, probe.offset.z);
|
current_position.z = DIFF_TERN(HAS_BED_PROBE, delta_height + 10, probe.offset.z);
|
||||||
line_to_current_position(homing_feedrate(Z_AXIS));
|
line_to_current_position(homing_feedrate(Z_AXIS));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
TERN_(SENSORLESS_PROBING,endstops.report_states());
|
TERN_(HAS_DELTA_SENSORLESS_PROBING, endstops.report_states());
|
||||||
|
|
||||||
// Re-enable stealthChop if used. Disable diag1 pin on driver.
|
// Re-enable stealthChop if used. Disable diag1 pin on driver.
|
||||||
#if ENABLED(SENSORLESS_HOMING) && DISABLED(ENDSTOPS_ALWAYS_ON_DEFAULT)
|
#if ENABLED(SENSORLESS_HOMING) && DISABLED(ENDSTOPS_ALWAYS_ON_DEFAULT)
|
||||||
|
|
|
@ -595,7 +595,7 @@ void _O2 Endstops::report_states() {
|
||||||
// The following routines are called from an ISR context. It could be the temperature ISR, the
|
// The following routines are called from an ISR context. It could be the temperature ISR, the
|
||||||
// endstop ISR or the Stepper ISR.
|
// endstop ISR or the Stepper ISR.
|
||||||
|
|
||||||
#if BOTH(DELTA, SENSORLESS_PROBING)
|
#if HAS_DELTA_SENSORLESS_PROBING
|
||||||
#define __ENDSTOP(AXIS, ...) AXIS ##_MAX
|
#define __ENDSTOP(AXIS, ...) AXIS ##_MAX
|
||||||
#define _ENDSTOP_PIN(AXIS, ...) AXIS ##_MAX_PIN
|
#define _ENDSTOP_PIN(AXIS, ...) AXIS ##_MAX_PIN
|
||||||
#define _ENDSTOP_INVERTING(AXIS, ...) AXIS ##_MAX_ENDSTOP_INVERTING
|
#define _ENDSTOP_INVERTING(AXIS, ...) AXIS ##_MAX_ENDSTOP_INVERTING
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue