浏览代码

Add XY parameters to G29 for mesh dimensions

Scott Lahteine 8 年前
父节点
当前提交
81b8c9f8ec
共有 1 个文件被更改,包括 16 次插入9 次删除
  1. 16
    9
      Marlin/Marlin_main.cpp

+ 16
- 9
Marlin/Marlin_main.cpp 查看文件

3635
 
3635
 
3636
     #if ABL_GRID
3636
     #if ABL_GRID
3637
 
3637
 
3638
-      #if ABL_PLANAR
3639
-        bool do_topography_map = verbose_level > 2 || code_seen('T');
3640
-      #endif
3641
-
3642
       if (verbose_level > 0) {
3638
       if (verbose_level > 0) {
3643
         SERIAL_PROTOCOLLNPGM("G29 Auto Bed Leveling");
3639
         SERIAL_PROTOCOLLNPGM("G29 Auto Bed Leveling");
3644
         if (dryrun) SERIAL_PROTOCOLLNPGM("Running in DRY-RUN mode");
3640
         if (dryrun) SERIAL_PROTOCOLLNPGM("Running in DRY-RUN mode");
3645
       }
3641
       }
3646
 
3642
 
3647
-      int abl_grid_points_x = ABL_GRID_POINTS_X,
3648
-          abl_grid_points_y = ABL_GRID_POINTS_Y;
3649
-
3650
       #if ABL_PLANAR
3643
       #if ABL_PLANAR
3644
+
3645
+        bool do_topography_map = verbose_level > 2 || code_seen('T');
3646
+
3647
+        // X and Y specify points in each direction, overriding the default
3648
+        // These values may be saved with the completed mesh
3649
+        int abl_grid_points_x = code_seen('X') ? code_value_int() : ABL_GRID_POINTS_X,
3650
+            abl_grid_points_y = code_seen('Y') ? code_value_int() : ABL_GRID_POINTS_Y;
3651
+
3651
         if (code_seen('P')) abl_grid_points_x = abl_grid_points_y = code_value_int();
3652
         if (code_seen('P')) abl_grid_points_x = abl_grid_points_y = code_value_int();
3652
-        if (abl_grid_points_x < 2) {
3653
-          SERIAL_PROTOCOLLNPGM("?Number of probed (P)oints is implausible (2 minimum).");
3653
+
3654
+        if (abl_grid_points_x < 2 || abl_grid_points_y < 2) {
3655
+          SERIAL_PROTOCOLLNPGM("?Number of probe points is implausible (2 minimum).");
3654
           return;
3656
           return;
3655
         }
3657
         }
3658
+
3659
+      #else
3660
+
3661
+         const int abl_grid_points_x = ABL_GRID_POINTS_X, abl_grid_points_y = ABL_GRID_POINTS_Y;
3662
+
3656
       #endif
3663
       #endif
3657
 
3664
 
3658
       xy_probe_feedrate_mm_s = MMM_TO_MMS(code_seen('S') ? code_value_linear_units() : XY_PROBE_SPEED);
3665
       xy_probe_feedrate_mm_s = MMM_TO_MMS(code_seen('S') ? code_value_linear_units() : XY_PROBE_SPEED);

正在加载...
取消
保存