From df75e9d692c1f0874b0c27f6670f03e33983eedd Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 29 Mar 2018 16:50:16 -0500 Subject: [PATCH] Fix BLTOUCH compile error Followup to #10249 --- Marlin/Marlin_main.cpp | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index b29344469e..5964a40156 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2900,14 +2900,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); - #endif + 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) @@ -2932,13 +2935,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); - #endif + 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();