Browse Source

Only deploy/stow BLTOUCH on downward move

Scott Lahteine 8 years ago
parent
commit
747a2257dd
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      Marlin/Marlin_main.cpp

+ 3
- 2
Marlin/Marlin_main.cpp View File

@@ -2194,7 +2194,8 @@ static void clean_up_after_endstop_or_probe_move() {
2194 2194
 static void do_homing_move(AxisEnum axis, float where, float fr_mm_s=0.0) {
2195 2195
 
2196 2196
   #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH)
2197
-    if (axis == Z_AXIS) set_bltouch_deployed(true);
2197
+    bool deploy_bltouch = (axis == Z_AXIS && where < 0);
2198
+    if (deploy_bltouch) set_bltouch_deployed(true);
2198 2199
   #endif
2199 2200
 
2200 2201
   current_position[axis] = 0;
@@ -2204,7 +2205,7 @@ static void do_homing_move(AxisEnum axis, float where, float fr_mm_s=0.0) {
2204 2205
   stepper.synchronize();
2205 2206
 
2206 2207
   #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH)
2207
-    if (axis == Z_AXIS) set_bltouch_deployed(false);
2208
+    if (deploy_bltouch) set_bltouch_deployed(false);
2208 2209
   #endif
2209 2210
 
2210 2211
   endstops.hit_on_purpose();

Loading…
Cancel
Save