From 747a2257dd4b104fe53710ebaef443794ea70b6b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 22 Sep 2016 14:27:22 -0500 Subject: [PATCH] Only deploy/stow BLTOUCH on downward move --- Marlin/Marlin_main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 63115ff7c5..51962d076f 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2194,7 +2194,8 @@ static void clean_up_after_endstop_or_probe_move() { static void do_homing_move(AxisEnum axis, float where, float fr_mm_s=0.0) { #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH) - if (axis == Z_AXIS) set_bltouch_deployed(true); + bool deploy_bltouch = (axis == Z_AXIS && where < 0); + if (deploy_bltouch) set_bltouch_deployed(true); #endif current_position[axis] = 0; @@ -2204,7 +2205,7 @@ static void do_homing_move(AxisEnum axis, float where, float fr_mm_s=0.0) { stepper.synchronize(); #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH) - if (axis == Z_AXIS) set_bltouch_deployed(false); + if (deploy_bltouch) set_bltouch_deployed(false); #endif endstops.hit_on_purpose();