瀏覽代碼

Allow UBL G29 J1 with PAUSE_BEFORE_DEPLOY_STOW (#15934)

Jason Smith 5 年之前
父節點
當前提交
9906e96ffb
共有 1 個文件被更改,包括 20 次插入16 次删除
  1. 20
    16
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

+ 20
- 16
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp 查看文件

@@ -741,13 +741,13 @@
741 741
      * This attempts to fill in locations closest to the nozzle's start location first.
742 742
      */
743 743
     void unified_bed_leveling::probe_entire_mesh(const xy_pos_t &near, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) {
744
+      DEPLOY_PROBE(); // Deploy before ui.capture() to allow for PAUSE_BEFORE_DEPLOY_STOW
745
+
744 746
       #if HAS_LCD_MENU
745 747
         ui.capture();
746 748
       #endif
747 749
 
748 750
       save_ubl_active_state_and_disable();  // No bed level correction so only raw data is obtained
749
-      DEPLOY_PROBE();
750
-
751 751
       uint8_t count = GRID_MAX_POINTS;
752 752
 
753 753
       mesh_index_pair best;
@@ -764,10 +764,10 @@
764 764
           if (ui.button_pressed()) {
765 765
             ui.quick_feedback(false); // Preserve button state for click-and-hold
766 766
             SERIAL_ECHOLNPGM("\nMesh only partially populated.\n");
767
-            STOW_PROBE();
768 767
             ui.wait_for_release();
769 768
             ui.quick_feedback();
770 769
             ui.release();
770
+            STOW_PROBE(); // Release UI before stow to allow for PAUSE_BEFORE_DEPLOY_STOW
771 771
             return restore_ubl_active_state_and_leave();
772 772
           }
773 773
         #endif
@@ -790,7 +790,9 @@
790 790
 
791 791
       } while (best.pos.x >= 0 && --count);
792 792
 
793
-      STOW_PROBE();
793
+      ui.release();
794
+      STOW_PROBE(); // Release UI during stow to allow for PAUSE_BEFORE_DEPLOY_STOW
795
+      ui.capture();
794 796
 
795 797
       #ifdef Z_AFTER_PROBING
796 798
         move_z_after_probing();
@@ -1504,18 +1506,20 @@
1504 1506
 
1505 1507
               abort_flag = isnan(measured_z);
1506 1508
 
1507
-              if (DEBUGGING(LEVELING)) {
1508
-                const xy_pos_t lpos = rpos.asLogical();
1509
-                DEBUG_CHAR('(');
1510
-                DEBUG_ECHO_F(rpos.x, 7);
1511
-                DEBUG_CHAR(',');
1512
-                DEBUG_ECHO_F(rpos.y, 7);
1513
-                DEBUG_ECHOPAIR_F(")   logical: (", lpos.x, 7);
1514
-                DEBUG_CHAR(',');
1515
-                DEBUG_ECHO_F(lpos.y, 7);
1516
-                DEBUG_ECHOPAIR_F(")   measured: ", measured_z, 7);
1517
-                DEBUG_ECHOPAIR_F("   correction: ", get_z_correction(rpos), 7);
1518
-              }
1509
+              #if ENABLED(DEBUG_LEVELING_FEATURE)
1510
+                if (DEBUGGING(LEVELING)) {
1511
+                  const xy_pos_t lpos = rpos.asLogical();
1512
+                  DEBUG_CHAR('(');
1513
+                  DEBUG_ECHO_F(rpos.x, 7);
1514
+                  DEBUG_CHAR(',');
1515
+                  DEBUG_ECHO_F(rpos.y, 7);
1516
+                  DEBUG_ECHOPAIR_F(")   logical: (", lpos.x, 7);
1517
+                  DEBUG_CHAR(',');
1518
+                  DEBUG_ECHO_F(lpos.y, 7);
1519
+                  DEBUG_ECHOPAIR_F(")   measured: ", measured_z, 7);
1520
+                  DEBUG_ECHOPAIR_F("   correction: ", get_z_correction(rpos), 7);
1521
+                }
1522
+              #endif
1519 1523
 
1520 1524
               measured_z -= get_z_correction(rpos) /* + probe_offset.z */ ;
1521 1525
 

Loading…
取消
儲存