Fix BLTOUCH compile error

Followup to #10250
This commit is contained in:
Scott Lahteine 2018-03-29 16:57:06 -05:00
parent c1f58a238d
commit b852781eba

View File

@ -1007,14 +1007,17 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa
const bool is_home_dir = (axis_home_dir > 0) == (distance > 0);
if (is_home_dir) {
#if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH)
const bool deploy_bltouch = (axis == Z_AXIS && is_home_dir);
if (deploy_bltouch) set_bltouch_deployed(true);
#endif
#if QUIET_PROBING
if (axis == Z_AXIS) probing_pause(true);
if (axis == Z_AXIS) {
#if HOMING_Z_WITH_PROBE
#if ENABLED(BLTOUCH)
set_bltouch_deployed(true);
#endif
#if QUIET_PROBING
probing_pause(true);
#endif
#endif
}
// Disable stealthChop if used. Enable diag1 pin on driver.
#if ENABLED(SENSORLESS_HOMING)
@ -1039,13 +1042,17 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa
stepper.synchronize();
if (is_home_dir) {
#if QUIET_PROBING
if (axis == Z_AXIS) probing_pause(false);
#endif
#if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH)
if (deploy_bltouch) set_bltouch_deployed(false);
if (axis == Z_AXIS) {
#if HOMING_Z_WITH_PROBE
#if QUIET_PROBING
probing_pause(false);
#endif
#if ENABLED(BLTOUCH)
set_bltouch_deployed(false);
#endif
#endif
}
endstops.hit_on_purpose();