[1.1.x] fix bltouch homing (#11380)

Partially revert. Seems to solve the issue, but one report says G29 still fails.
This commit is contained in:
Giuliano 2018-07-28 01:29:26 +02:00 committed by Scott Lahteine
parent cab2e0877e
commit 7284488da3

View File

@ -3056,7 +3056,12 @@ static void homeaxis(const AxisEnum axis) {
// Homing Z towards the bed? Deploy the Z probe or endstop. // Homing Z towards the bed? Deploy the Z probe or endstop.
#if HOMING_Z_WITH_PROBE #if HOMING_Z_WITH_PROBE
if (axis == Z_AXIS && DEPLOY_PROBE()) return; if (axis == Z_AXIS) {
if (DEPLOY_PROBE()) return;
#if ENABLED(BLTOUCH)
if (set_bltouch_deployed(true)) return;
#endif
}
#endif #endif
// Set flags for X, Y, Z motor locking // Set flags for X, Y, Z motor locking
@ -3081,8 +3086,9 @@ static void homeaxis(const AxisEnum axis) {
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Home 1 Fast:"); if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Home 1 Fast:");
#endif #endif
do_homing_move(axis, 1.5f * max_length(axis) * axis_home_dir); do_homing_move(axis, 1.5f * max_length(axis) * axis_home_dir);
#if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH) #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH)
// BLTOUCH needs to be stowed after trigger to let rearm itself // BLTOUCH needs to be stowed after trigger to rearm itself
if (axis == Z_AXIS) set_bltouch_deployed(false); if (axis == Z_AXIS) set_bltouch_deployed(false);
#endif #endif
@ -3112,17 +3118,13 @@ static void homeaxis(const AxisEnum axis) {
#endif #endif
#if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH) #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH)
// BLTOUCH needs to deploy everytime // BLTOUCH needs to be deployed every time
if (axis == Z_AXIS && set_bltouch_deployed(true)) return; if (axis == Z_AXIS && set_bltouch_deployed(true)) return;
#endif #endif
do_homing_move(axis, 2 * bump, get_homing_bump_feedrate(axis)); do_homing_move(axis, 2 * bump, get_homing_bump_feedrate(axis));
} }
// Put away the Z probe
#if HOMING_Z_WITH_PROBE
if (axis == Z_AXIS && STOW_PROBE()) return;
#endif
/** /**
* Home axes that have dual endstops... differently * Home axes that have dual endstops... differently
*/ */
@ -3198,6 +3200,16 @@ static void homeaxis(const AxisEnum axis) {
#endif #endif
// Put away the Z probe
#if HOMING_Z_WITH_PROBE
if (axis == Z_AXIS) {
#if ENABLED(BLTOUCH)
if (set_bltouch_deployed(false)) return;
#endif
if (STOW_PROBE()) return;
}
#endif
// Clear retracted status if homing the Z axis // Clear retracted status if homing the Z axis
#if ENABLED(FWRETRACT) #if ENABLED(FWRETRACT)
if (axis == Z_AXIS) fwretract.hop_amount = 0.0; if (axis == Z_AXIS) fwretract.hop_amount = 0.0;