️ Improve Sensorless homing/probing accuracy for G28, G33, M48 (#24220)

Co-Authored-By: Robby Candra <robbycandra.mail@gmail.com>
Co-Authored-By: ellensp <530024+ellensp@users.noreply.github.com>
This commit is contained in:
lujios
2022-06-03 07:19:25 +02:00
committed by Scott Lahteine
parent 0253500ccd
commit fcef8d946c
12 changed files with 212 additions and 77 deletions

View File

@ -1541,7 +1541,12 @@ void prepare_line_to_destination() {
}
// Disable stealthChop if used. Enable diag1 pin on driver.
TERN_(SENSORLESS_HOMING, stealth_states = start_sensorless_homing_per_axis(axis));
#if ENABLED(SENSORLESS_HOMING)
stealth_states = start_sensorless_homing_per_axis(axis);
#if SENSORLESS_STALLGUARD_DELAY
safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
#endif
#endif
}
#if EITHER(MORGAN_SCARA, MP_SCARA)
@ -1577,7 +1582,12 @@ void prepare_line_to_destination() {
endstops.validate_homing_move();
// Re-enable stealthChop if used. Disable diag1 pin on driver.
TERN_(SENSORLESS_HOMING, end_sensorless_homing_per_axis(axis, stealth_states));
#if ENABLED(SENSORLESS_HOMING)
end_sensorless_homing_per_axis(axis, stealth_states);
#if SENSORLESS_STALLGUARD_DELAY
safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
#endif
#endif
}
}