Ver código fonte

[2.0.x] fix bltouch homing (#11379)

Partially revert. Seems to solve the issue, but one report says G29 still fails.
Giuliano 6 anos atrás
pai
commit
5ce5ff8e9b
1 arquivos alterados com 20 adições e 8 exclusões
  1. 20
    8
      Marlin/src/module/motion.cpp

+ 20
- 8
Marlin/src/module/motion.cpp Ver arquivo

@@ -1297,7 +1297,12 @@ void homeaxis(const AxisEnum axis) {
1297 1297
 
1298 1298
   // Homing Z towards the bed? Deploy the Z probe or endstop.
1299 1299
   #if HOMING_Z_WITH_PROBE
1300
-    if (axis == Z_AXIS && DEPLOY_PROBE()) return;
1300
+    if (axis == Z_AXIS) {
1301
+      if (DEPLOY_PROBE()) return;
1302
+      #if ENABLED(BLTOUCH)
1303
+        if (set_bltouch_deployed(true)) return;
1304
+      #endif
1305
+    }
1301 1306
   #endif
1302 1307
 
1303 1308
   // Set flags for X, Y, Z motor locking
@@ -1322,8 +1327,9 @@ void homeaxis(const AxisEnum axis) {
1322 1327
     if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Home 1 Fast:");
1323 1328
   #endif
1324 1329
   do_homing_move(axis, 1.5f * max_length(axis) * axis_home_dir);
1330
+
1325 1331
   #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH)
1326
-    // BLTOUCH needs to be stowed after trigger to let rearm itself
1332
+    // BLTOUCH needs to be stowed after trigger to rearm itself
1327 1333
     if (axis == Z_AXIS) set_bltouch_deployed(false);
1328 1334
   #endif
1329 1335
 
@@ -1353,17 +1359,13 @@ void homeaxis(const AxisEnum axis) {
1353 1359
     #endif
1354 1360
 
1355 1361
     #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH)
1356
-      // BLTOUCH needs to deploy everytime
1362
+      // BLTOUCH needs to be deployed every time
1357 1363
       if (axis == Z_AXIS && set_bltouch_deployed(true)) return;
1358 1364
     #endif
1365
+
1359 1366
     do_homing_move(axis, 2 * bump, get_homing_bump_feedrate(axis));
1360 1367
   }
1361 1368
 
1362
-  // Put away the Z probe
1363
-  #if HOMING_Z_WITH_PROBE
1364
-    if (axis == Z_AXIS && STOW_PROBE()) return;
1365
-  #endif
1366
-
1367 1369
   #if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
1368 1370
     const bool pos_dir = axis_home_dir > 0;
1369 1371
     #if ENABLED(X_DUAL_ENDSTOPS)
@@ -1436,6 +1438,16 @@ void homeaxis(const AxisEnum axis) {
1436 1438
 
1437 1439
   #endif
1438 1440
 
1441
+  // Put away the Z probe
1442
+  #if HOMING_Z_WITH_PROBE
1443
+    if (axis == Z_AXIS) {
1444
+      #if ENABLED(BLTOUCH)
1445
+        if (set_bltouch_deployed(false)) return;
1446
+      #endif
1447
+      if (STOW_PROBE()) return;
1448
+    }
1449
+  #endif
1450
+
1439 1451
   // Clear retracted status if homing the Z axis
1440 1452
   #if ENABLED(FWRETRACT)
1441 1453
     if (axis == Z_AXIS) fwretract.hop_amount = 0.0;

Carregando…
Cancelar
Salvar