Clear sensorless homing in home_delta after first move-to-top

This commit is contained in:
Scott Lahteine 2018-03-28 21:27:34 -05:00
parent dbe2b6f7b0
commit 8b7381b626

View File

@ -260,15 +260,17 @@ bool home_delta() {
line_to_current_position(); line_to_current_position();
stepper.synchronize(); stepper.synchronize();
// Re-enable stealthChop if used. Disable diag1 pin on driver.
#if ENABLED(SENSORLESS_HOMING)
delta_sensorless_homing(false);
#endif
// If an endstop was not hit, then damage can occur if homing is continued. // If an endstop was not hit, then damage can occur if homing is continued.
// This can occur if the delta height not set correctly. // This can occur if the delta height not set correctly.
if (!(Endstops::endstop_hit_bits & (_BV(X_MAX) | _BV(Y_MAX) | _BV(Z_MAX)))) { if (!(Endstops::endstop_hit_bits & (_BV(X_MAX) | _BV(Y_MAX) | _BV(Z_MAX)))) {
LCD_MESSAGEPGM(MSG_ERR_HOMING_FAILED); LCD_MESSAGEPGM(MSG_ERR_HOMING_FAILED);
SERIAL_ERROR_START(); SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_HOMING_FAILED); SERIAL_ERRORLNPGM(MSG_ERR_HOMING_FAILED);
#if ENABLED(SENSORLESS_HOMING)
delta_sensorless_homing(false);
#endif
return false; return false;
} }
@ -280,11 +282,6 @@ bool home_delta() {
HOMEAXIS(B); HOMEAXIS(B);
HOMEAXIS(C); HOMEAXIS(C);
// Re-enable stealthChop if used. Disable diag1 pin on driver.
#if ENABLED(SENSORLESS_HOMING)
delta_sensorless_homing(false);
#endif
// Set all carriages to their home positions // Set all carriages to their home positions
// Do this here all at once for Delta, because // Do this here all at once for Delta, because
// XYZ isn't ABC. Applying this per-tower would // XYZ isn't ABC. Applying this per-tower would