Browse Source

Move G29 3-point startup earlier

Scott Lahteine 4 years ago
parent
commit
a8dffdebd4
1 changed files with 5 additions and 11 deletions
  1. 5
    11
      Marlin/src/gcode/bedlevel/abl/G29.cpp

+ 5
- 11
Marlin/src/gcode/bedlevel/abl/G29.cpp View File

@@ -394,6 +394,11 @@ G29_TYPE GcodeSuite::G29() {
394 394
 
395 395
     planner.synchronize();
396 396
 
397
+    #if ENABLED(AUTO_BED_LEVELING_3POINT)
398
+      if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling");
399
+      points[0].z = points[1].z = points[2].z = 0;  // Probe at 3 arbitrary points
400
+    #endif
401
+
397 402
     if (!faux) remember_feedrate_scaling_off();
398 403
 
399 404
     // Disable auto bed leveling during G29.
@@ -411,7 +416,6 @@ G29_TYPE GcodeSuite::G29() {
411 416
     #endif
412 417
 
413 418
     #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
414
-
415 419
       if (TERN1(PROBE_MANUALLY, !no_action)
416 420
         && (gridSpacing != bilinear_grid_spacing || probe_position_lf != bilinear_start)
417 421
       ) {
@@ -425,18 +429,8 @@ G29_TYPE GcodeSuite::G29() {
425 429
         // Can't re-enable (on error) until the new grid is written
426 430
         abl_should_enable = false;
427 431
       }
428
-
429 432
     #endif // AUTO_BED_LEVELING_BILINEAR
430 433
 
431
-    #if ENABLED(AUTO_BED_LEVELING_3POINT)
432
-
433
-      if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling");
434
-
435
-      // Probe at 3 arbitrary points
436
-      points[0].z = points[1].z = points[2].z = 0;
437
-
438
-    #endif // AUTO_BED_LEVELING_3POINT
439
-
440 434
   } // !g29_in_progress
441 435
 
442 436
   #if ENABLED(PROBE_MANUALLY)

Loading…
Cancel
Save