瀏覽代碼

Use same config name for all mesh dimensions

Scott Lahteine 8 年之前
父節點
當前提交
eb1e6aa29b
共有 35 個檔案被更改,包括 318 行新增314 行删除
  1. 6
    6
      Marlin/Configuration.h
  2. 10
    10
      Marlin/G26_Mesh_Validation_Tool.cpp
  3. 1
    1
      Marlin/Marlin.h
  4. 52
    52
      Marlin/Marlin_main.cpp
  5. 16
    12
      Marlin/SanityCheck.h
  6. 14
    14
      Marlin/UBL.h
  7. 16
    16
      Marlin/UBL_Bed_Leveling.cpp
  8. 31
    31
      Marlin/UBL_G29.cpp
  9. 1
    1
      Marlin/UBL_line_to_destination.cpp
  10. 18
    18
      Marlin/configuration_store.cpp
  11. 6
    6
      Marlin/example_configurations/Cartesio/Configuration.h
  12. 6
    6
      Marlin/example_configurations/Felix/Configuration.h
  13. 6
    6
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  14. 6
    6
      Marlin/example_configurations/Hephestos/Configuration.h
  15. 6
    6
      Marlin/example_configurations/Hephestos_2/Configuration.h
  16. 6
    6
      Marlin/example_configurations/K8200/Configuration.h
  17. 6
    6
      Marlin/example_configurations/K8400/Configuration.h
  18. 6
    6
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  19. 6
    6
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  20. 6
    6
      Marlin/example_configurations/RigidBot/Configuration.h
  21. 6
    6
      Marlin/example_configurations/SCARA/Configuration.h
  22. 6
    6
      Marlin/example_configurations/TAZ4/Configuration.h
  23. 6
    6
      Marlin/example_configurations/TinyBoy2/Configuration.h
  24. 6
    6
      Marlin/example_configurations/WITBOX/Configuration.h
  25. 6
    6
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  26. 6
    6
      Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h
  27. 6
    6
      Marlin/example_configurations/delta/generic/Configuration.h
  28. 6
    6
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  29. 7
    7
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  30. 6
    6
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  31. 6
    6
      Marlin/example_configurations/makibox/Configuration.h
  32. 6
    6
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  33. 5
    5
      Marlin/mesh_bed_leveling.cpp
  34. 12
    12
      Marlin/mesh_bed_leveling.h
  35. 3
    3
      Marlin/ultralcd.cpp

+ 6
- 6
Marlin/Configuration.h 查看文件

813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
814
 
814
 
815
   // Set the number of grid points per dimension.
815
   // Set the number of grid points per dimension.
816
-  #define ABL_GRID_MAX_POINTS_X 3
817
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
816
+  #define GRID_MAX_POINTS_X 3
817
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
818
 
818
 
819
   // Set the boundaries for probing (where the probe can reach).
819
   // Set the boundaries for probing (where the probe can reach).
820
   #define LEFT_PROBE_BED_POSITION 15
820
   #define LEFT_PROBE_BED_POSITION 15
860
   //===========================================================================
860
   //===========================================================================
861
 
861
 
862
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
862
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
863
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
864
-  #define UBL_MESH_NUM_Y_POINTS 10
863
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
864
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
867
   #define UBL_PROBE_PT_2_X 39
867
   #define UBL_PROBE_PT_2_X 39
877
   //===========================================================================
877
   //===========================================================================
878
 
878
 
879
   #define MESH_INSET 10          // Mesh inset margin on print area
879
   #define MESH_INSET 10          // Mesh inset margin on print area
880
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
881
-  #define MESH_NUM_Y_POINTS 3
880
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
881
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
882
 
882
 
883
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
883
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
884
 
884
 

+ 10
- 10
Marlin/G26_Mesh_Validation_Tool.cpp 查看文件

293
           end_angle   =  90.0;
293
           end_angle   =  90.0;
294
           if (yi == 0)        // it is an edge, check for the two left corners
294
           if (yi == 0)        // it is an edge, check for the two left corners
295
             start_angle = 0.0;
295
             start_angle = 0.0;
296
-          else if (yi == UBL_MESH_NUM_Y_POINTS - 1)
296
+          else if (yi == GRID_MAX_POINTS_Y - 1)
297
             end_angle = 0.0;
297
             end_angle = 0.0;
298
         }
298
         }
299
-        else if (xi == UBL_MESH_NUM_X_POINTS - 1) { // Check for top edge
299
+        else if (xi == GRID_MAX_POINTS_X - 1) { // Check for top edge
300
           start_angle =  90.0;
300
           start_angle =  90.0;
301
           end_angle   = 270.0;
301
           end_angle   = 270.0;
302
           if (yi == 0)                  // it is an edge, check for the two right corners
302
           if (yi == 0)                  // it is an edge, check for the two right corners
303
             end_angle = 180.0;
303
             end_angle = 180.0;
304
-          else if (yi == UBL_MESH_NUM_Y_POINTS - 1)
304
+          else if (yi == GRID_MAX_POINTS_Y - 1)
305
             start_angle = 180.0;
305
             start_angle = 180.0;
306
         }
306
         }
307
         else if (yi == 0) {
307
         else if (yi == 0) {
308
           start_angle =   0.0;         // only do the top   side of the cirlce
308
           start_angle =   0.0;         // only do the top   side of the cirlce
309
           end_angle   = 180.0;
309
           end_angle   = 180.0;
310
         }
310
         }
311
-        else if (yi == UBL_MESH_NUM_Y_POINTS - 1) {
311
+        else if (yi == GRID_MAX_POINTS_Y - 1) {
312
           start_angle = 180.0;         // only do the bottom side of the cirlce
312
           start_angle = 180.0;         // only do the bottom side of the cirlce
313
           end_angle   = 360.0;
313
           end_angle   = 360.0;
314
         }
314
         }
397
 
397
 
398
     return_val.x_index = return_val.y_index = -1;
398
     return_val.x_index = return_val.y_index = -1;
399
 
399
 
400
-    for (uint8_t i = 0; i < UBL_MESH_NUM_X_POINTS; i++) {
401
-      for (uint8_t j = 0; j < UBL_MESH_NUM_Y_POINTS; j++) {
400
+    for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
401
+      for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
402
         if (!is_bit_set(circle_flags, i, j)) {
402
         if (!is_bit_set(circle_flags, i, j)) {
403
           const float mx = ubl.mesh_index_to_xpos[i],  // We found a circle that needs to be printed
403
           const float mx = ubl.mesh_index_to_xpos[i],  // We found a circle that needs to be printed
404
                       my = ubl.mesh_index_to_ypos[j];
404
                       my = ubl.mesh_index_to_ypos[j];
432
   void look_for_lines_to_connect() {
432
   void look_for_lines_to_connect() {
433
     float sx, sy, ex, ey;
433
     float sx, sy, ex, ey;
434
 
434
 
435
-    for (uint8_t i = 0; i < UBL_MESH_NUM_X_POINTS; i++) {
436
-      for (uint8_t j = 0; j < UBL_MESH_NUM_Y_POINTS; j++) {
435
+    for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
436
+      for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
437
 
437
 
438
-        if (i < UBL_MESH_NUM_X_POINTS) { // We can't connect to anything to the right than UBL_MESH_NUM_X_POINTS.
438
+        if (i < GRID_MAX_POINTS_X) { // We can't connect to anything to the right than GRID_MAX_POINTS_X.
439
                                          // This is already a half circle because we are at the edge of the bed.
439
                                          // This is already a half circle because we are at the edge of the bed.
440
 
440
 
441
           if (is_bit_set(circle_flags, i, j) && is_bit_set(circle_flags, i + 1, j)) { // check if we can do a line to the left
441
           if (is_bit_set(circle_flags, i, j) && is_bit_set(circle_flags, i + 1, j)) { // check if we can do a line to the left
467
             }
467
             }
468
           }
468
           }
469
 
469
 
470
-          if (j < UBL_MESH_NUM_Y_POINTS) { // We can't connect to anything further back than UBL_MESH_NUM_Y_POINTS.
470
+          if (j < GRID_MAX_POINTS_Y) { // We can't connect to anything further back than GRID_MAX_POINTS_Y.
471
                                            // This is already a half circle because we are at the edge  of the bed.
471
                                            // This is already a half circle because we are at the edge  of the bed.
472
 
472
 
473
             if (is_bit_set(circle_flags, i, j) && is_bit_set(circle_flags, i, j + 1)) { // check if we can do a line straight down
473
             if (is_bit_set(circle_flags, i, j) && is_bit_set(circle_flags, i, j + 1)) { // check if we can do a line straight down

+ 1
- 1
Marlin/Marlin.h 查看文件

283
 
283
 
284
 #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
284
 #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
285
   extern int bilinear_grid_spacing[2], bilinear_start[2];
285
   extern int bilinear_grid_spacing[2], bilinear_start[2];
286
-  extern float bed_level_grid[ABL_GRID_MAX_POINTS_X][ABL_GRID_MAX_POINTS_Y];
286
+  extern float bed_level_grid[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
287
   float bilinear_z_offset(float logical[XYZ]);
287
   float bilinear_z_offset(float logical[XYZ]);
288
   void set_bed_leveling_enabled(bool enable=true);
288
   void set_bed_leveling_enabled(bool enable=true);
289
 #endif
289
 #endif

+ 52
- 52
Marlin/Marlin_main.cpp 查看文件

589
 
589
 
590
 #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
590
 #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
591
   int bilinear_grid_spacing[2], bilinear_start[2];
591
   int bilinear_grid_spacing[2], bilinear_start[2];
592
-  float bed_level_grid[ABL_GRID_MAX_POINTS_X][ABL_GRID_MAX_POINTS_Y];
592
+  float bed_level_grid[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
593
 #endif
593
 #endif
594
 
594
 
595
 #if IS_SCARA
595
 #if IS_SCARA
2341
       #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
2341
       #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
2342
         bilinear_start[X_AXIS] = bilinear_start[Y_AXIS] =
2342
         bilinear_start[X_AXIS] = bilinear_start[Y_AXIS] =
2343
         bilinear_grid_spacing[X_AXIS] = bilinear_grid_spacing[Y_AXIS] = 0;
2343
         bilinear_grid_spacing[X_AXIS] = bilinear_grid_spacing[Y_AXIS] = 0;
2344
-        for (uint8_t x = 0; x < ABL_GRID_MAX_POINTS_X; x++)
2345
-          for (uint8_t y = 0; y < ABL_GRID_MAX_POINTS_Y; y++)
2344
+        for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
2345
+          for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
2346
             bed_level_grid[x][y] = NAN;
2346
             bed_level_grid[x][y] = NAN;
2347
       #elif ENABLED(AUTO_BED_LEVELING_UBL)
2347
       #elif ENABLED(AUTO_BED_LEVELING_UBL)
2348
         ubl.reset();
2348
         ubl.reset();
2473
   //#define EXTRAPOLATE_FROM_EDGE
2473
   //#define EXTRAPOLATE_FROM_EDGE
2474
 
2474
 
2475
   #if ENABLED(EXTRAPOLATE_FROM_EDGE)
2475
   #if ENABLED(EXTRAPOLATE_FROM_EDGE)
2476
-    #if ABL_GRID_MAX_POINTS_X < ABL_GRID_MAX_POINTS_Y
2476
+    #if GRID_MAX_POINTS_X < GRID_MAX_POINTS_Y
2477
       #define HALF_IN_X
2477
       #define HALF_IN_X
2478
-    #elif ABL_GRID_MAX_POINTS_Y < ABL_GRID_MAX_POINTS_X
2478
+    #elif GRID_MAX_POINTS_Y < GRID_MAX_POINTS_X
2479
       #define HALF_IN_Y
2479
       #define HALF_IN_Y
2480
     #endif
2480
     #endif
2481
   #endif
2481
   #endif
2486
    */
2486
    */
2487
   static void extrapolate_unprobed_bed_level() {
2487
   static void extrapolate_unprobed_bed_level() {
2488
     #ifdef HALF_IN_X
2488
     #ifdef HALF_IN_X
2489
-      const uint8_t ctrx2 = 0, xlen = ABL_GRID_MAX_POINTS_X - 1;
2489
+      const uint8_t ctrx2 = 0, xlen = GRID_MAX_POINTS_X - 1;
2490
     #else
2490
     #else
2491
-      const uint8_t ctrx1 = (ABL_GRID_MAX_POINTS_X - 1) / 2, // left-of-center
2492
-                    ctrx2 = ABL_GRID_MAX_POINTS_X / 2,       // right-of-center
2491
+      const uint8_t ctrx1 = (GRID_MAX_POINTS_X - 1) / 2, // left-of-center
2492
+                    ctrx2 = GRID_MAX_POINTS_X / 2,       // right-of-center
2493
                     xlen = ctrx1;
2493
                     xlen = ctrx1;
2494
     #endif
2494
     #endif
2495
 
2495
 
2496
     #ifdef HALF_IN_Y
2496
     #ifdef HALF_IN_Y
2497
-      const uint8_t ctry2 = 0, ylen = ABL_GRID_MAX_POINTS_Y - 1;
2497
+      const uint8_t ctry2 = 0, ylen = GRID_MAX_POINTS_Y - 1;
2498
     #else
2498
     #else
2499
-      const uint8_t ctry1 = (ABL_GRID_MAX_POINTS_Y - 1) / 2, // top-of-center
2500
-                    ctry2 = ABL_GRID_MAX_POINTS_Y / 2,       // bottom-of-center
2499
+      const uint8_t ctry1 = (GRID_MAX_POINTS_Y - 1) / 2, // top-of-center
2500
+                    ctry2 = GRID_MAX_POINTS_Y / 2,       // bottom-of-center
2501
                     ylen = ctry1;
2501
                     ylen = ctry1;
2502
     #endif
2502
     #endif
2503
 
2503
 
2524
 
2524
 
2525
   static void print_bilinear_leveling_grid() {
2525
   static void print_bilinear_leveling_grid() {
2526
     SERIAL_ECHOLNPGM("Bilinear Leveling Grid:");
2526
     SERIAL_ECHOLNPGM("Bilinear Leveling Grid:");
2527
-    print_2d_array(ABL_GRID_MAX_POINTS_X, ABL_GRID_MAX_POINTS_Y, 3,
2527
+    print_2d_array(GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y, 3,
2528
       [](const uint8_t ix, const uint8_t iy) { return bed_level_grid[ix][iy]; }
2528
       [](const uint8_t ix, const uint8_t iy) { return bed_level_grid[ix][iy]; }
2529
     );
2529
     );
2530
   }
2530
   }
2531
 
2531
 
2532
   #if ENABLED(ABL_BILINEAR_SUBDIVISION)
2532
   #if ENABLED(ABL_BILINEAR_SUBDIVISION)
2533
 
2533
 
2534
-    #define ABL_GRID_POINTS_VIRT_X (ABL_GRID_MAX_POINTS_X - 1) * (BILINEAR_SUBDIVISIONS) + 1
2535
-    #define ABL_GRID_POINTS_VIRT_Y (ABL_GRID_MAX_POINTS_Y - 1) * (BILINEAR_SUBDIVISIONS) + 1
2536
-    #define ABL_TEMP_POINTS_X (ABL_GRID_MAX_POINTS_X + 2)
2537
-    #define ABL_TEMP_POINTS_Y (ABL_GRID_MAX_POINTS_Y + 2)
2534
+    #define ABL_GRID_POINTS_VIRT_X (GRID_MAX_POINTS_X - 1) * (BILINEAR_SUBDIVISIONS) + 1
2535
+    #define ABL_GRID_POINTS_VIRT_Y (GRID_MAX_POINTS_Y - 1) * (BILINEAR_SUBDIVISIONS) + 1
2536
+    #define ABL_TEMP_POINTS_X (GRID_MAX_POINTS_X + 2)
2537
+    #define ABL_TEMP_POINTS_Y (GRID_MAX_POINTS_Y + 2)
2538
     float bed_level_grid_virt[ABL_GRID_POINTS_VIRT_X][ABL_GRID_POINTS_VIRT_Y];
2538
     float bed_level_grid_virt[ABL_GRID_POINTS_VIRT_X][ABL_GRID_POINTS_VIRT_Y];
2539
     int bilinear_grid_spacing_virt[2] = { 0 };
2539
     int bilinear_grid_spacing_virt[2] = { 0 };
2540
 
2540
 
2550
       uint8_t ep = 0, ip = 1;
2550
       uint8_t ep = 0, ip = 1;
2551
       if (!x || x == ABL_TEMP_POINTS_X - 1) {
2551
       if (!x || x == ABL_TEMP_POINTS_X - 1) {
2552
         if (x) {
2552
         if (x) {
2553
-          ep = ABL_GRID_MAX_POINTS_X - 1;
2554
-          ip = ABL_GRID_MAX_POINTS_X - 2;
2553
+          ep = GRID_MAX_POINTS_X - 1;
2554
+          ip = GRID_MAX_POINTS_X - 2;
2555
         }
2555
         }
2556
         if (WITHIN(y, 1, ABL_TEMP_POINTS_Y - 2))
2556
         if (WITHIN(y, 1, ABL_TEMP_POINTS_Y - 2))
2557
           return LINEAR_EXTRAPOLATION(
2557
           return LINEAR_EXTRAPOLATION(
2566
       }
2566
       }
2567
       if (!y || y == ABL_TEMP_POINTS_Y - 1) {
2567
       if (!y || y == ABL_TEMP_POINTS_Y - 1) {
2568
         if (y) {
2568
         if (y) {
2569
-          ep = ABL_GRID_MAX_POINTS_Y - 1;
2570
-          ip = ABL_GRID_MAX_POINTS_Y - 2;
2569
+          ep = GRID_MAX_POINTS_Y - 1;
2570
+          ip = GRID_MAX_POINTS_Y - 2;
2571
         }
2571
         }
2572
         if (WITHIN(x, 1, ABL_TEMP_POINTS_X - 2))
2572
         if (WITHIN(x, 1, ABL_TEMP_POINTS_X - 2))
2573
           return LINEAR_EXTRAPOLATION(
2573
           return LINEAR_EXTRAPOLATION(
2604
     }
2604
     }
2605
 
2605
 
2606
     void bed_level_virt_interpolate() {
2606
     void bed_level_virt_interpolate() {
2607
-      for (uint8_t y = 0; y < ABL_GRID_MAX_POINTS_Y; y++)
2608
-        for (uint8_t x = 0; x < ABL_GRID_MAX_POINTS_X; x++)
2607
+      for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
2608
+        for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
2609
           for (uint8_t ty = 0; ty < BILINEAR_SUBDIVISIONS; ty++)
2609
           for (uint8_t ty = 0; ty < BILINEAR_SUBDIVISIONS; ty++)
2610
             for (uint8_t tx = 0; tx < BILINEAR_SUBDIVISIONS; tx++) {
2610
             for (uint8_t tx = 0; tx < BILINEAR_SUBDIVISIONS; tx++) {
2611
-              if ((ty && y == ABL_GRID_MAX_POINTS_Y - 1) || (tx && x == ABL_GRID_MAX_POINTS_X - 1))
2611
+              if ((ty && y == GRID_MAX_POINTS_Y - 1) || (tx && x == GRID_MAX_POINTS_X - 1))
2612
                 continue;
2612
                 continue;
2613
               bed_level_grid_virt[x * (BILINEAR_SUBDIVISIONS) + tx][y * (BILINEAR_SUBDIVISIONS) + ty] =
2613
               bed_level_grid_virt[x * (BILINEAR_SUBDIVISIONS) + tx][y * (BILINEAR_SUBDIVISIONS) + ty] =
2614
                 bed_level_virt_2cmr(
2614
                 bed_level_virt_2cmr(
3752
   void say_not_entered() { SERIAL_PROTOCOLLNPGM(" not entered."); }
3752
   void say_not_entered() { SERIAL_PROTOCOLLNPGM(" not entered."); }
3753
 
3753
 
3754
   void mbl_mesh_report() {
3754
   void mbl_mesh_report() {
3755
-    SERIAL_PROTOCOLLNPGM("Num X,Y: " STRINGIFY(MESH_NUM_X_POINTS) "," STRINGIFY(MESH_NUM_Y_POINTS));
3755
+    SERIAL_PROTOCOLLNPGM("Num X,Y: " STRINGIFY(GRID_MAX_POINTS_X) "," STRINGIFY(GRID_MAX_POINTS_Y));
3756
     SERIAL_PROTOCOLPGM("Z offset: "); SERIAL_PROTOCOL_F(mbl.z_offset, 5);
3756
     SERIAL_PROTOCOLPGM("Z offset: "); SERIAL_PROTOCOL_F(mbl.z_offset, 5);
3757
     SERIAL_PROTOCOLLNPGM("\nMeasured points:");
3757
     SERIAL_PROTOCOLLNPGM("\nMeasured points:");
3758
-    print_2d_array(MESH_NUM_X_POINTS, MESH_NUM_Y_POINTS, 5,
3758
+    print_2d_array(GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y, 5,
3759
       [](const uint8_t ix, const uint8_t iy) { return mbl.z_values[ix][iy]; }
3759
       [](const uint8_t ix, const uint8_t iy) { return mbl.z_values[ix][iy]; }
3760
     );
3760
     );
3761
   }
3761
   }
3832
           #endif
3832
           #endif
3833
         }
3833
         }
3834
         // If there's another point to sample, move there with optional lift.
3834
         // If there's another point to sample, move there with optional lift.
3835
-        if (mbl_probe_index < (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS)) {
3835
+        if (mbl_probe_index < (GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y)) {
3836
           mbl.zigzag(mbl_probe_index, px, py);
3836
           mbl.zigzag(mbl_probe_index, px, py);
3837
           _manual_goto_xy(mbl.index_to_xpos[px], mbl.index_to_ypos[py]);
3837
           _manual_goto_xy(mbl.index_to_xpos[px], mbl.index_to_ypos[py]);
3838
 
3838
 
3864
       case MeshSet:
3864
       case MeshSet:
3865
         if (code_seen('X')) {
3865
         if (code_seen('X')) {
3866
           px = code_value_int() - 1;
3866
           px = code_value_int() - 1;
3867
-          if (!WITHIN(px, 0, MESH_NUM_X_POINTS - 1)) {
3868
-            SERIAL_PROTOCOLLNPGM("X out of range (1-" STRINGIFY(MESH_NUM_X_POINTS) ").");
3867
+          if (!WITHIN(px, 0, GRID_MAX_POINTS_X - 1)) {
3868
+            SERIAL_PROTOCOLLNPGM("X out of range (1-" STRINGIFY(GRID_MAX_POINTS_X) ").");
3869
             return;
3869
             return;
3870
           }
3870
           }
3871
         }
3871
         }
3876
 
3876
 
3877
         if (code_seen('Y')) {
3877
         if (code_seen('Y')) {
3878
           py = code_value_int() - 1;
3878
           py = code_value_int() - 1;
3879
-          if (!WITHIN(py, 0, MESH_NUM_Y_POINTS - 1)) {
3880
-            SERIAL_PROTOCOLLNPGM("Y out of range (1-" STRINGIFY(MESH_NUM_Y_POINTS) ").");
3879
+          if (!WITHIN(py, 0, GRID_MAX_POINTS_Y - 1)) {
3880
+            SERIAL_PROTOCOLLNPGM("Y out of range (1-" STRINGIFY(GRID_MAX_POINTS_Y) ").");
3881
             return;
3881
             return;
3882
           }
3882
           }
3883
         }
3883
         }
4034
       ABL_VAR int left_probe_bed_position, right_probe_bed_position, front_probe_bed_position, back_probe_bed_position;
4034
       ABL_VAR int left_probe_bed_position, right_probe_bed_position, front_probe_bed_position, back_probe_bed_position;
4035
       ABL_VAR float xGridSpacing, yGridSpacing;
4035
       ABL_VAR float xGridSpacing, yGridSpacing;
4036
 
4036
 
4037
-      #define ABL_GRID_MAX (ABL_GRID_MAX_POINTS_X) * (ABL_GRID_MAX_POINTS_Y)
4037
+      #define ABL_GRID_MAX (GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y)
4038
 
4038
 
4039
       #if ABL_PLANAR
4039
       #if ABL_PLANAR
4040
-        ABL_VAR uint8_t abl_grid_points_x = ABL_GRID_MAX_POINTS_X,
4041
-                        abl_grid_points_y = ABL_GRID_MAX_POINTS_Y;
4040
+        ABL_VAR uint8_t abl_grid_points_x = GRID_MAX_POINTS_X,
4041
+                        abl_grid_points_y = GRID_MAX_POINTS_Y;
4042
         ABL_VAR int abl2;
4042
         ABL_VAR int abl2;
4043
         ABL_VAR bool do_topography_map;
4043
         ABL_VAR bool do_topography_map;
4044
       #else // 3-point
4044
       #else // 3-point
4045
-        uint8_t constexpr abl_grid_points_x = ABL_GRID_MAX_POINTS_X,
4046
-                          abl_grid_points_y = ABL_GRID_MAX_POINTS_Y;
4045
+        uint8_t constexpr abl_grid_points_x = GRID_MAX_POINTS_X,
4046
+                          abl_grid_points_y = GRID_MAX_POINTS_Y;
4047
 
4047
 
4048
         int constexpr abl2 = ABL_GRID_MAX;
4048
         int constexpr abl2 = ABL_GRID_MAX;
4049
       #endif
4049
       #endif
4054
 
4054
 
4055
       #elif ENABLED(AUTO_BED_LEVELING_LINEAR)
4055
       #elif ENABLED(AUTO_BED_LEVELING_LINEAR)
4056
 
4056
 
4057
-        ABL_VAR int indexIntoAB[ABL_GRID_MAX_POINTS_X][ABL_GRID_MAX_POINTS_Y];
4057
+        ABL_VAR int indexIntoAB[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
4058
 
4058
 
4059
         ABL_VAR float eqnAMatrix[ABL_GRID_MAX * 3], // "A" matrix of the linear system of equations
4059
         ABL_VAR float eqnAMatrix[ABL_GRID_MAX * 3], // "A" matrix of the linear system of equations
4060
                      eqnBVector[ABL_GRID_MAX],     // "B" vector of Z points
4060
                      eqnBVector[ABL_GRID_MAX],     // "B" vector of Z points
4105
             // Get nearest i / j from x / y
4105
             // Get nearest i / j from x / y
4106
             i = (x - LOGICAL_X_POSITION(bilinear_start[X_AXIS]) + 0.5 * xGridSpacing) / xGridSpacing;
4106
             i = (x - LOGICAL_X_POSITION(bilinear_start[X_AXIS]) + 0.5 * xGridSpacing) / xGridSpacing;
4107
             j = (y - LOGICAL_Y_POSITION(bilinear_start[Y_AXIS]) + 0.5 * yGridSpacing) / yGridSpacing;
4107
             j = (y - LOGICAL_Y_POSITION(bilinear_start[Y_AXIS]) + 0.5 * yGridSpacing) / yGridSpacing;
4108
-            i = constrain(i, 0, ABL_GRID_MAX_POINTS_X - 1);
4109
-            j = constrain(j, 0, ABL_GRID_MAX_POINTS_Y - 1);
4108
+            i = constrain(i, 0, GRID_MAX_POINTS_X - 1);
4109
+            j = constrain(j, 0, GRID_MAX_POINTS_Y - 1);
4110
           }
4110
           }
4111
-          if (WITHIN(i, 0, ABL_GRID_MAX_POINTS_X - 1) && WITHIN(j, 0, ABL_GRID_MAX_POINTS_Y)) {
4111
+          if (WITHIN(i, 0, GRID_MAX_POINTS_X - 1) && WITHIN(j, 0, GRID_MAX_POINTS_Y)) {
4112
             set_bed_leveling_enabled(false);
4112
             set_bed_leveling_enabled(false);
4113
             bed_level_grid[i][j] = z;
4113
             bed_level_grid[i][j] = z;
4114
             #if ENABLED(ABL_BILINEAR_SUBDIVISION)
4114
             #if ENABLED(ABL_BILINEAR_SUBDIVISION)
4145
 
4145
 
4146
         // X and Y specify points in each direction, overriding the default
4146
         // X and Y specify points in each direction, overriding the default
4147
         // These values may be saved with the completed mesh
4147
         // These values may be saved with the completed mesh
4148
-        abl_grid_points_x = code_seen('X') ? code_value_int() : ABL_GRID_MAX_POINTS_X;
4149
-        abl_grid_points_y = code_seen('Y') ? code_value_int() : ABL_GRID_MAX_POINTS_Y;
4148
+        abl_grid_points_x = code_seen('X') ? code_value_int() : GRID_MAX_POINTS_X;
4149
+        abl_grid_points_y = code_seen('Y') ? code_value_int() : GRID_MAX_POINTS_Y;
4150
         if (code_seen('P')) abl_grid_points_x = abl_grid_points_y = code_value_int();
4150
         if (code_seen('P')) abl_grid_points_x = abl_grid_points_y = code_value_int();
4151
 
4151
 
4152
         if (abl_grid_points_x < 2 || abl_grid_points_y < 2) {
4152
         if (abl_grid_points_x < 2 || abl_grid_points_y < 2) {
7627
       }
7627
       }
7628
     }
7628
     }
7629
     else if (hasI && hasJ && hasZ) {
7629
     else if (hasI && hasJ && hasZ) {
7630
-      if (WITHIN(px, 0, MESH_NUM_X_POINTS - 1) && WITHIN(py, 0, MESH_NUM_Y_POINTS - 1))
7630
+      if (WITHIN(px, 0, GRID_MAX_POINTS_X - 1) && WITHIN(py, 0, GRID_MAX_POINTS_Y - 1))
7631
         mbl.set_z(px, py, z);
7631
         mbl.set_z(px, py, z);
7632
       else {
7632
       else {
7633
         SERIAL_ERROR_START;
7633
         SERIAL_ERROR_START;
7656
     if ((hasZ = code_seen('Z'))) z = code_value_axis_units(Z_AXIS);
7656
     if ((hasZ = code_seen('Z'))) z = code_value_axis_units(Z_AXIS);
7657
 
7657
 
7658
     if (hasI && hasJ && hasZ) {
7658
     if (hasI && hasJ && hasZ) {
7659
-      if (WITHIN(px, 0, ABL_GRID_MAX_POINTS_X - 1) && WITHIN(py, 0, ABL_GRID_MAX_POINTS_X - 1)) {
7659
+      if (WITHIN(px, 0, GRID_MAX_POINTS_X - 1) && WITHIN(py, 0, GRID_MAX_POINTS_X - 1)) {
7660
         bed_level_grid[px][py] = z;
7660
         bed_level_grid[px][py] = z;
7661
         #if ENABLED(ABL_BILINEAR_SUBDIVISION)
7661
         #if ENABLED(ABL_BILINEAR_SUBDIVISION)
7662
           bed_level_virt_interpolate();
7662
           bed_level_virt_interpolate();
7687
     if ((hasZ = code_seen('Z'))) z = code_value_axis_units(Z_AXIS);
7687
     if ((hasZ = code_seen('Z'))) z = code_value_axis_units(Z_AXIS);
7688
 
7688
 
7689
     if (hasI && hasJ && hasZ) {
7689
     if (hasI && hasJ && hasZ) {
7690
-      if (WITHIN(px, 0, UBL_MESH_NUM_Y_POINTS - 1) && WITHIN(py, 0, UBL_MESH_NUM_Y_POINTS - 1)) {
7690
+      if (WITHIN(px, 0, GRID_MAX_POINTS_Y - 1) && WITHIN(py, 0, GRID_MAX_POINTS_Y - 1)) {
7691
         ubl.z_values[px][py] = z;
7691
         ubl.z_values[px][py] = z;
7692
       }
7692
       }
7693
       else {
7693
       else {
7801
           // Correct bilinear grid for new probe offset
7801
           // Correct bilinear grid for new probe offset
7802
           const float diff = value - zprobe_zoffset;
7802
           const float diff = value - zprobe_zoffset;
7803
           if (diff) {
7803
           if (diff) {
7804
-            for (uint8_t x = 0; x < ABL_GRID_MAX_POINTS_X; x++)
7805
-              for (uint8_t y = 0; y < ABL_GRID_MAX_POINTS_Y; y++)
7804
+            for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
7805
+              for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
7806
                 bed_level_grid[x][y] += diff;
7806
                 bed_level_grid[x][y] += diff;
7807
           }
7807
           }
7808
           #if ENABLED(ABL_BILINEAR_SUBDIVISION)
7808
           #if ENABLED(ABL_BILINEAR_SUBDIVISION)
9661
     #define ABL_BG_GRID(X,Y)  bed_level_grid_virt[X][Y]
9661
     #define ABL_BG_GRID(X,Y)  bed_level_grid_virt[X][Y]
9662
   #else
9662
   #else
9663
     #define ABL_BG_SPACING(A) bilinear_grid_spacing[A]
9663
     #define ABL_BG_SPACING(A) bilinear_grid_spacing[A]
9664
-    #define ABL_BG_POINTS_X   ABL_GRID_MAX_POINTS_X
9665
-    #define ABL_BG_POINTS_Y   ABL_GRID_MAX_POINTS_Y
9664
+    #define ABL_BG_POINTS_X   GRID_MAX_POINTS_X
9665
+    #define ABL_BG_POINTS_Y   GRID_MAX_POINTS_Y
9666
     #define ABL_BG_GRID(X,Y)  bed_level_grid[X][Y]
9666
     #define ABL_BG_GRID(X,Y)  bed_level_grid[X][Y]
9667
   #endif
9667
   #endif
9668
 
9668
 
9989
         cy1 = mbl.cell_index_y(RAW_CURRENT_POSITION(Y_AXIS)),
9989
         cy1 = mbl.cell_index_y(RAW_CURRENT_POSITION(Y_AXIS)),
9990
         cx2 = mbl.cell_index_x(RAW_X_POSITION(destination[X_AXIS])),
9990
         cx2 = mbl.cell_index_x(RAW_X_POSITION(destination[X_AXIS])),
9991
         cy2 = mbl.cell_index_y(RAW_Y_POSITION(destination[Y_AXIS]));
9991
         cy2 = mbl.cell_index_y(RAW_Y_POSITION(destination[Y_AXIS]));
9992
-    NOMORE(cx1, MESH_NUM_X_POINTS - 2);
9993
-    NOMORE(cy1, MESH_NUM_Y_POINTS - 2);
9994
-    NOMORE(cx2, MESH_NUM_X_POINTS - 2);
9995
-    NOMORE(cy2, MESH_NUM_Y_POINTS - 2);
9992
+    NOMORE(cx1, GRID_MAX_POINTS_X - 2);
9993
+    NOMORE(cy1, GRID_MAX_POINTS_Y - 2);
9994
+    NOMORE(cx2, GRID_MAX_POINTS_X - 2);
9995
+    NOMORE(cy2, GRID_MAX_POINTS_Y - 2);
9996
 
9996
 
9997
     if (cx1 == cx2 && cy1 == cy2) {
9997
     if (cx1 == cx2 && cy1 == cy2) {
9998
       // Start and end on same mesh square
9998
       // Start and end on same mesh square

+ 16
- 12
Marlin/SanityCheck.h 查看文件

147
 #elif defined(AUTO_BED_LEVELING_FEATURE)
147
 #elif defined(AUTO_BED_LEVELING_FEATURE)
148
   #error "AUTO_BED_LEVELING_FEATURE is deprecated. Specify AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_3POINT."
148
   #error "AUTO_BED_LEVELING_FEATURE is deprecated. Specify AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_3POINT."
149
 #elif defined(ABL_GRID_POINTS)
149
 #elif defined(ABL_GRID_POINTS)
150
-  #error "ABL_GRID_POINTS is now ABL_GRID_MAX_POINTS_X and ABL_GRID_MAX_POINTS_Y. Please update your configuration."
150
+  #error "ABL_GRID_POINTS is now GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y. Please update your configuration."
151
 #elif defined(ABL_GRID_POINTS_X) || defined(ABL_GRID_POINTS_Y)
151
 #elif defined(ABL_GRID_POINTS_X) || defined(ABL_GRID_POINTS_Y)
152
-  #error "ABL_GRID_POINTS_[XY] is now ABL_GRID_MAX_POINTS_[XY]. Please update your configuration."
152
+  #error "ABL_GRID_POINTS_[XY] is now GRID_MAX_POINTS_[XY]. Please update your configuration."
153
+#elif defined(ABL_GRID_MAX_POINTS_X) || defined(ABL_GRID_MAX_POINTS_Y)
154
+  #error "ABL_GRID_MAX_POINTS_[XY] is now GRID_MAX_POINTS_[XY]. Please update your configuration."
155
+#elif defined(MESH_NUM_X_POINTS) || defined(MESH_NUM_Y_POINTS)
156
+  #error "MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]. Please update your configuration."
157
+#elif defined(UBL_MESH_NUM_X_POINTS) || defined(UBL_MESH_NUM_Y_POINTS)
158
+  #error "UBL_MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]. Please update your configuration."
153
 #elif defined(UBL_MESH_EDIT_ENABLED)
159
 #elif defined(UBL_MESH_EDIT_ENABLED)
154
   #error "UBL_MESH_EDIT_ENABLED is now UBL_G26_MESH_EDITING. Please update your configuration."
160
   #error "UBL_MESH_EDIT_ENABLED is now UBL_G26_MESH_EDITING. Please update your configuration."
155
 #elif defined(BEEPER)
161
 #elif defined(BEEPER)
242
     #error "DELTA is incompatible with ENABLE_LEVELING_FADE_HEIGHT. Please disable it."
248
     #error "DELTA is incompatible with ENABLE_LEVELING_FADE_HEIGHT. Please disable it."
243
   #endif
249
   #endif
244
   #if ABL_GRID
250
   #if ABL_GRID
245
-    #if (ABL_GRID_MAX_POINTS_X & 1) == 0 || (ABL_GRID_MAX_POINTS_Y & 1) == 0
246
-      #error "DELTA requires ABL_GRID_MAX_POINTS_X and ABL_GRID_MAX_POINTS_Y to be odd numbers."
247
-    #elif ABL_GRID_MAX_POINTS_X < 3
248
-      #error "DELTA requires ABL_GRID_MAX_POINTS_X and ABL_GRID_MAX_POINTS_Y to be 3 or higher."
251
+    #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0
252
+      #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers."
253
+    #elif GRID_MAX_POINTS_X < 3
254
+      #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be 3 or higher."
249
     #endif
255
     #endif
250
   #endif
256
   #endif
251
 #endif
257
 #endif
411
 #if ENABLED(MESH_BED_LEVELING)
417
 #if ENABLED(MESH_BED_LEVELING)
412
   #if ENABLED(DELTA)
418
   #if ENABLED(DELTA)
413
     #error "MESH_BED_LEVELING does not yet support DELTA printers."
419
     #error "MESH_BED_LEVELING does not yet support DELTA printers."
414
-  #elif MESH_NUM_X_POINTS > 9 || MESH_NUM_Y_POINTS > 9
415
-    #error "MESH_NUM_X_POINTS and MESH_NUM_Y_POINTS must be less than 10."
420
+  #elif GRID_MAX_POINTS_X > 9 || GRID_MAX_POINTS_Y > 9
421
+    #error "GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y must be less than 10 for MBL."
416
   #endif
422
   #endif
417
 #endif
423
 #endif
418
 
424
 
424
     #error "AUTO_BED_LEVELING_UBL does not yet support DELTA printers."
430
     #error "AUTO_BED_LEVELING_UBL does not yet support DELTA printers."
425
   #elif DISABLED(NEWPANEL)
431
   #elif DISABLED(NEWPANEL)
426
     #error "AUTO_BED_LEVELING_UBL requires an LCD controller."
432
     #error "AUTO_BED_LEVELING_UBL requires an LCD controller."
427
-  #elif UBL_MESH_NUM_X_POINTS > 15 || UBL_MESH_NUM_Y_POINTS > 15
428
-    #error "UBL_MESH_NUM_X_POINTS and UBL_MESH_NUM_Y_POINTS must be less than 16."
429
   #endif
433
   #endif
430
 #endif
434
 #endif
431
 
435
 
602
   #elif ENABLED(AUTO_BED_LEVELING_UBL)
606
   #elif ENABLED(AUTO_BED_LEVELING_UBL)
603
     #if DISABLED(EEPROM_SETTINGS)
607
     #if DISABLED(EEPROM_SETTINGS)
604
       #error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS. Please update your configuration."
608
       #error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS. Please update your configuration."
605
-    #elif !WITHIN(UBL_MESH_NUM_X_POINTS, 3, 15) || !WITHIN(UBL_MESH_NUM_Y_POINTS, 3, 15)
606
-      #error "UBL_MESH_NUM_[XY]_POINTS must be a whole number between 3 and 15."
609
+    #elif !WITHIN(GRID_MAX_POINTS_X, 3, 15) || !WITHIN(GRID_MAX_POINTS_Y, 3, 15)
610
+      #error "GRID_MAX_POINTS_[XY] must be a whole number between 3 and 15."
607
     #elif !WITHIN(UBL_PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X)
611
     #elif !WITHIN(UBL_PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X)
608
       #error "The given UBL_PROBE_PT_1_X can't be reached by the Z probe."
612
       #error "The given UBL_PROBE_PT_1_X can't be reached by the Z probe."
609
     #elif !WITHIN(UBL_PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X)
613
     #elif !WITHIN(UBL_PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X)

+ 14
- 14
Marlin/UBL.h 查看文件

78
 
78
 
79
     enum MBLStatus { MBL_STATUS_NONE = 0, MBL_STATUS_HAS_MESH_BIT = 0, MBL_STATUS_ACTIVE_BIT = 1 };
79
     enum MBLStatus { MBL_STATUS_NONE = 0, MBL_STATUS_HAS_MESH_BIT = 0, MBL_STATUS_ACTIVE_BIT = 1 };
80
 
80
 
81
-    #define MESH_X_DIST (float(UBL_MESH_MAX_X - (UBL_MESH_MIN_X)) / float(UBL_MESH_NUM_X_POINTS - 1))
82
-    #define MESH_Y_DIST (float(UBL_MESH_MAX_Y - (UBL_MESH_MIN_Y)) / float(UBL_MESH_NUM_Y_POINTS - 1))
81
+    #define MESH_X_DIST (float(UBL_MESH_MAX_X - (UBL_MESH_MIN_X)) / float(GRID_MAX_POINTS_X - 1))
82
+    #define MESH_Y_DIST (float(UBL_MESH_MAX_Y - (UBL_MESH_MIN_Y)) / float(GRID_MAX_POINTS_Y - 1))
83
 
83
 
84
     typedef struct {
84
     typedef struct {
85
       bool active = false;
85
       bool active = false;
86
       float z_offset = 0.0;
86
       float z_offset = 0.0;
87
       int8_t eeprom_storage_slot = -1,
87
       int8_t eeprom_storage_slot = -1,
88
-             n_x = UBL_MESH_NUM_X_POINTS,
89
-             n_y = UBL_MESH_NUM_Y_POINTS;
88
+             n_x = GRID_MAX_POINTS_X,
89
+             n_y = GRID_MAX_POINTS_Y;
90
 
90
 
91
       float mesh_x_min = UBL_MESH_MIN_X,
91
       float mesh_x_min = UBL_MESH_MIN_X,
92
             mesh_y_min = UBL_MESH_MIN_Y,
92
             mesh_y_min = UBL_MESH_MIN_Y,
122
 
122
 
123
         static ubl_state state, pre_initialized;
123
         static ubl_state state, pre_initialized;
124
 
124
 
125
-        static float z_values[UBL_MESH_NUM_X_POINTS][UBL_MESH_NUM_Y_POINTS],
126
-                     mesh_index_to_xpos[UBL_MESH_NUM_X_POINTS + 1], // +1 safety margin for now, until determinism prevails
127
-                     mesh_index_to_ypos[UBL_MESH_NUM_Y_POINTS + 1];
125
+        static float z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y],
126
+                     mesh_index_to_xpos[GRID_MAX_POINTS_X + 1], // +1 safety margin for now, until determinism prevails
127
+                     mesh_index_to_ypos[GRID_MAX_POINTS_Y + 1];
128
 
128
 
129
         static bool g26_debug_flag,
129
         static bool g26_debug_flag,
130
                     has_control_of_lcd_panel;
130
                     has_control_of_lcd_panel;
151
 
151
 
152
         static int8_t get_cell_index_x(const float &x) {
152
         static int8_t get_cell_index_x(const float &x) {
153
           const int8_t cx = (x - (UBL_MESH_MIN_X)) * (1.0 / (MESH_X_DIST));
153
           const int8_t cx = (x - (UBL_MESH_MIN_X)) * (1.0 / (MESH_X_DIST));
154
-          return constrain(cx, 0, (UBL_MESH_NUM_X_POINTS) - 1);   // -1 is appropriate if we want all movement to the X_MAX
154
+          return constrain(cx, 0, (GRID_MAX_POINTS_X) - 1);   // -1 is appropriate if we want all movement to the X_MAX
155
         }                                                         // position. But with this defined this way, it is possible
155
         }                                                         // position. But with this defined this way, it is possible
156
                                                                   // to extrapolate off of this point even further out. Probably
156
                                                                   // to extrapolate off of this point even further out. Probably
157
                                                                   // that is OK because something else should be keeping that from
157
                                                                   // that is OK because something else should be keeping that from
158
                                                                   // happening and should not be worried about at this level.
158
                                                                   // happening and should not be worried about at this level.
159
         static int8_t get_cell_index_y(const float &y) {
159
         static int8_t get_cell_index_y(const float &y) {
160
           const int8_t cy = (y - (UBL_MESH_MIN_Y)) * (1.0 / (MESH_Y_DIST));
160
           const int8_t cy = (y - (UBL_MESH_MIN_Y)) * (1.0 / (MESH_Y_DIST));
161
-          return constrain(cy, 0, (UBL_MESH_NUM_Y_POINTS) - 1);   // -1 is appropriate if we want all movement to the Y_MAX
161
+          return constrain(cy, 0, (GRID_MAX_POINTS_Y) - 1);   // -1 is appropriate if we want all movement to the Y_MAX
162
         }                                                         // position. But with this defined this way, it is possible
162
         }                                                         // position. But with this defined this way, it is possible
163
                                                                   // to extrapolate off of this point even further out. Probably
163
                                                                   // to extrapolate off of this point even further out. Probably
164
                                                                   // that is OK because something else should be keeping that from
164
                                                                   // that is OK because something else should be keeping that from
166
 
166
 
167
         static int8_t find_closest_x_index(const float &x) {
167
         static int8_t find_closest_x_index(const float &x) {
168
           const int8_t px = (x - (UBL_MESH_MIN_X) + (MESH_X_DIST) * 0.5) * (1.0 / (MESH_X_DIST));
168
           const int8_t px = (x - (UBL_MESH_MIN_X) + (MESH_X_DIST) * 0.5) * (1.0 / (MESH_X_DIST));
169
-          return WITHIN(px, 0, UBL_MESH_NUM_X_POINTS - 1) ? px : -1;
169
+          return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
170
         }
170
         }
171
 
171
 
172
         static int8_t find_closest_y_index(const float &y) {
172
         static int8_t find_closest_y_index(const float &y) {
173
           const int8_t py = (y - (UBL_MESH_MIN_Y) + (MESH_Y_DIST) * 0.5) * (1.0 / (MESH_Y_DIST));
173
           const int8_t py = (y - (UBL_MESH_MIN_Y) + (MESH_Y_DIST) * 0.5) * (1.0 / (MESH_Y_DIST));
174
-          return WITHIN(py, 0, UBL_MESH_NUM_Y_POINTS - 1) ? py : -1;
174
+          return WITHIN(py, 0, GRID_MAX_POINTS_Y - 1) ? py : -1;
175
         }
175
         }
176
 
176
 
177
         /**
177
         /**
198
          * the rare occasion when a point lies exactly on a Mesh line (denoted by index yi).
198
          * the rare occasion when a point lies exactly on a Mesh line (denoted by index yi).
199
          */
199
          */
200
         static inline float z_correction_for_x_on_horizontal_mesh_line(const float &lx0, const int x1_i, const int yi) {
200
         static inline float z_correction_for_x_on_horizontal_mesh_line(const float &lx0, const int x1_i, const int yi) {
201
-          if (!WITHIN(x1_i, 0, UBL_MESH_NUM_X_POINTS - 1) || !WITHIN(yi, 0, UBL_MESH_NUM_Y_POINTS - 1)) {
201
+          if (!WITHIN(x1_i, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(yi, 0, GRID_MAX_POINTS_Y - 1)) {
202
             SERIAL_ECHOPAIR("? in z_correction_for_x_on_horizontal_mesh_line(lx0=", lx0);
202
             SERIAL_ECHOPAIR("? in z_correction_for_x_on_horizontal_mesh_line(lx0=", lx0);
203
             SERIAL_ECHOPAIR(",x1_i=", x1_i);
203
             SERIAL_ECHOPAIR(",x1_i=", x1_i);
204
             SERIAL_ECHOPAIR(",yi=", yi);
204
             SERIAL_ECHOPAIR(",yi=", yi);
217
         // See comments above for z_correction_for_x_on_horizontal_mesh_line
217
         // See comments above for z_correction_for_x_on_horizontal_mesh_line
218
         //
218
         //
219
         static inline float z_correction_for_y_on_vertical_mesh_line(const float &ly0, const int xi, const int y1_i) {
219
         static inline float z_correction_for_y_on_vertical_mesh_line(const float &ly0, const int xi, const int y1_i) {
220
-          if (!WITHIN(xi, 0, UBL_MESH_NUM_X_POINTS - 1) || !WITHIN(y1_i, 0, UBL_MESH_NUM_Y_POINTS - 1)) {
220
+          if (!WITHIN(xi, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(y1_i, 0, GRID_MAX_POINTS_Y - 1)) {
221
             SERIAL_ECHOPAIR("? in get_z_correction_along_vertical_mesh_line_at_specific_x(ly0=", ly0);
221
             SERIAL_ECHOPAIR("? in get_z_correction_along_vertical_mesh_line_at_specific_x(ly0=", ly0);
222
             SERIAL_ECHOPAIR(", x1_i=", xi);
222
             SERIAL_ECHOPAIR(", x1_i=", xi);
223
             SERIAL_ECHOPAIR(", yi=", y1_i);
223
             SERIAL_ECHOPAIR(", yi=", y1_i);
242
           const int8_t cx = get_cell_index_x(RAW_X_POSITION(lx0)),
242
           const int8_t cx = get_cell_index_x(RAW_X_POSITION(lx0)),
243
                        cy = get_cell_index_y(RAW_Y_POSITION(ly0));
243
                        cy = get_cell_index_y(RAW_Y_POSITION(ly0));
244
 
244
 
245
-          if (!WITHIN(cx, 0, UBL_MESH_NUM_X_POINTS - 1) || !WITHIN(cy, 0, UBL_MESH_NUM_Y_POINTS - 1)) {
245
+          if (!WITHIN(cx, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(cy, 0, GRID_MAX_POINTS_Y - 1)) {
246
 
246
 
247
             SERIAL_ECHOPAIR("? in get_z_correction(lx0=", lx0);
247
             SERIAL_ECHOPAIR("? in get_z_correction(lx0=", lx0);
248
             SERIAL_ECHOPAIR(", ly0=", ly0);
248
             SERIAL_ECHOPAIR(", ly0=", ly0);

+ 16
- 16
Marlin/UBL_Bed_Leveling.cpp 查看文件

48
   }
48
   }
49
 
49
 
50
   static void serial_echo_10x_spaces() {
50
   static void serial_echo_10x_spaces() {
51
-    for (uint8_t i = UBL_MESH_NUM_X_POINTS - 1; --i;) {
51
+    for (uint8_t i = GRID_MAX_POINTS_X - 1; --i;) {
52
       SERIAL_ECHOPGM("          ");
52
       SERIAL_ECHOPGM("          ");
53
       #if TX_BUFFER_SIZE > 0
53
       #if TX_BUFFER_SIZE > 0
54
         MYSERIAL.flushTX();
54
         MYSERIAL.flushTX();
59
 
59
 
60
   ubl_state unified_bed_leveling::state, unified_bed_leveling::pre_initialized;
60
   ubl_state unified_bed_leveling::state, unified_bed_leveling::pre_initialized;
61
 
61
 
62
-  float unified_bed_leveling::z_values[UBL_MESH_NUM_X_POINTS][UBL_MESH_NUM_Y_POINTS],
62
+  float unified_bed_leveling::z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y],
63
         unified_bed_leveling::last_specified_z,
63
         unified_bed_leveling::last_specified_z,
64
-        unified_bed_leveling::mesh_index_to_xpos[UBL_MESH_NUM_X_POINTS + 1], // +1 safety margin for now, until determinism prevails
65
-        unified_bed_leveling::mesh_index_to_ypos[UBL_MESH_NUM_Y_POINTS + 1];
64
+        unified_bed_leveling::mesh_index_to_xpos[GRID_MAX_POINTS_X + 1], // +1 safety margin for now, until determinism prevails
65
+        unified_bed_leveling::mesh_index_to_ypos[GRID_MAX_POINTS_Y + 1];
66
 
66
 
67
   bool unified_bed_leveling::g26_debug_flag = false,
67
   bool unified_bed_leveling::g26_debug_flag = false,
68
        unified_bed_leveling::has_control_of_lcd_panel = false;
68
        unified_bed_leveling::has_control_of_lcd_panel = false;
165
   void unified_bed_leveling::invalidate() {
165
   void unified_bed_leveling::invalidate() {
166
     state.active = false;
166
     state.active = false;
167
     state.z_offset = 0;
167
     state.z_offset = 0;
168
-    for (int x = 0; x < UBL_MESH_NUM_X_POINTS; x++)
169
-      for (int y = 0; y < UBL_MESH_NUM_Y_POINTS; y++)
168
+    for (int x = 0; x < GRID_MAX_POINTS_X; x++)
169
+      for (int y = 0; y < GRID_MAX_POINTS_Y; y++)
170
         z_values[x][y] = NAN;
170
         z_values[x][y] = NAN;
171
   }
171
   }
172
 
172
 
176
 
176
 
177
     if (map0) {
177
     if (map0) {
178
       SERIAL_PROTOCOLLNPGM("\nBed Topography Report:\n");
178
       SERIAL_PROTOCOLLNPGM("\nBed Topography Report:\n");
179
-      serial_echo_xy(0, UBL_MESH_NUM_Y_POINTS - 1);
179
+      serial_echo_xy(0, GRID_MAX_POINTS_Y - 1);
180
       SERIAL_ECHOPGM("    ");
180
       SERIAL_ECHOPGM("    ");
181
     }
181
     }
182
 
182
 
183
     if (map0) {
183
     if (map0) {
184
       serial_echo_10x_spaces();
184
       serial_echo_10x_spaces();
185
-      serial_echo_xy(UBL_MESH_NUM_X_POINTS - 1, UBL_MESH_NUM_Y_POINTS - 1);
185
+      serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1);
186
       SERIAL_EOL;
186
       SERIAL_EOL;
187
       serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MIN_Y);
187
       serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MIN_Y);
188
       serial_echo_10x_spaces();
188
       serial_echo_10x_spaces();
193
     const float current_xi = ubl.get_cell_index_x(current_position[X_AXIS] + (MESH_X_DIST) / 2.0),
193
     const float current_xi = ubl.get_cell_index_x(current_position[X_AXIS] + (MESH_X_DIST) / 2.0),
194
                 current_yi = ubl.get_cell_index_y(current_position[Y_AXIS] + (MESH_Y_DIST) / 2.0);
194
                 current_yi = ubl.get_cell_index_y(current_position[Y_AXIS] + (MESH_Y_DIST) / 2.0);
195
 
195
 
196
-    for (int8_t j = UBL_MESH_NUM_Y_POINTS - 1; j >= 0; j--) {
197
-      for (uint8_t i = 0; i < UBL_MESH_NUM_X_POINTS; i++) {
196
+    for (int8_t j = GRID_MAX_POINTS_Y - 1; j >= 0; j--) {
197
+      for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
198
         const bool is_current = i == current_xi && j == current_yi;
198
         const bool is_current = i == current_xi && j == current_yi;
199
 
199
 
200
         // is the nozzle here? then mark the number
200
         // is the nozzle here? then mark the number
210
           SERIAL_PROTOCOL_F(f, 3);
210
           SERIAL_PROTOCOL_F(f, 3);
211
           idle();
211
           idle();
212
         }
212
         }
213
-        if (!map0 && i < UBL_MESH_NUM_X_POINTS - 1) SERIAL_CHAR(',');
213
+        if (!map0 && i < GRID_MAX_POINTS_X - 1) SERIAL_CHAR(',');
214
 
214
 
215
         #if TX_BUFFER_SIZE > 0
215
         #if TX_BUFFER_SIZE > 0
216
           MYSERIAL.flushTX();
216
           MYSERIAL.flushTX();
237
       serial_echo_xy(0, 0);
237
       serial_echo_xy(0, 0);
238
       SERIAL_ECHOPGM("       ");
238
       SERIAL_ECHOPGM("       ");
239
       serial_echo_10x_spaces();
239
       serial_echo_10x_spaces();
240
-      serial_echo_xy(UBL_MESH_NUM_X_POINTS - 1, 0);
240
+      serial_echo_xy(GRID_MAX_POINTS_X - 1, 0);
241
       SERIAL_EOL;
241
       SERIAL_EOL;
242
     }
242
     }
243
   }
243
   }
245
   bool unified_bed_leveling::sanity_check() {
245
   bool unified_bed_leveling::sanity_check() {
246
     uint8_t error_flag = 0;
246
     uint8_t error_flag = 0;
247
 
247
 
248
-    if (state.n_x != UBL_MESH_NUM_X_POINTS) {
249
-      SERIAL_PROTOCOLLNPGM("?UBL_MESH_NUM_X_POINTS set wrong\n");
248
+    if (state.n_x != GRID_MAX_POINTS_X) {
249
+      SERIAL_PROTOCOLLNPGM("?GRID_MAX_POINTS_X set wrong\n");
250
       error_flag++;
250
       error_flag++;
251
     }
251
     }
252
-    if (state.n_y != UBL_MESH_NUM_Y_POINTS) {
253
-      SERIAL_PROTOCOLLNPGM("?UBL_MESH_NUM_Y_POINTS set wrong\n");
252
+    if (state.n_y != GRID_MAX_POINTS_Y) {
253
+      SERIAL_PROTOCOLLNPGM("?GRID_MAX_POINTS_Y set wrong\n");
254
       error_flag++;
254
       error_flag++;
255
     }
255
     }
256
     if (state.mesh_x_min != UBL_MESH_MIN_X) {
256
     if (state.mesh_x_min != UBL_MESH_MIN_X) {

+ 31
- 31
Marlin/UBL_G29.cpp 查看文件

354
       SERIAL_PROTOCOLLNPGM("Loading test_pattern values.\n");
354
       SERIAL_PROTOCOLLNPGM("Loading test_pattern values.\n");
355
       switch (test_pattern) {
355
       switch (test_pattern) {
356
         case 0:
356
         case 0:
357
-          for (uint8_t x = 0; x < UBL_MESH_NUM_X_POINTS; x++) {   // Create a bowl shape - similar to
358
-            for (uint8_t y = 0; y < UBL_MESH_NUM_Y_POINTS; y++) { // a poorly calibrated Delta.
359
-              const float p1 = 0.5 * (UBL_MESH_NUM_X_POINTS) - x,
360
-                          p2 = 0.5 * (UBL_MESH_NUM_Y_POINTS) - y;
357
+          for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) {   // Create a bowl shape - similar to
358
+            for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) { // a poorly calibrated Delta.
359
+              const float p1 = 0.5 * (GRID_MAX_POINTS_X) - x,
360
+                          p2 = 0.5 * (GRID_MAX_POINTS_Y) - y;
361
               ubl.z_values[x][y] += 2.0 * HYPOT(p1, p2);
361
               ubl.z_values[x][y] += 2.0 * HYPOT(p1, p2);
362
             }
362
             }
363
           }
363
           }
364
           break;
364
           break;
365
         case 1:
365
         case 1:
366
-          for (uint8_t x = 0; x < UBL_MESH_NUM_X_POINTS; x++) {  // Create a diagonal line several Mesh cells thick that is raised
366
+          for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) {  // Create a diagonal line several Mesh cells thick that is raised
367
             ubl.z_values[x][x] += 9.999;
367
             ubl.z_values[x][x] += 9.999;
368
-            ubl.z_values[x][x + (x < UBL_MESH_NUM_Y_POINTS - 1) ? 1 : -1] += 9.999; // We want the altered line several mesh points thick
368
+            ubl.z_values[x][x + (x < GRID_MAX_POINTS_Y - 1) ? 1 : -1] += 9.999; // We want the altered line several mesh points thick
369
           }
369
           }
370
           break;
370
           break;
371
         case 2:
371
         case 2:
372
           // Allow the user to specify the height because 10mm is a little extreme in some cases.
372
           // Allow the user to specify the height because 10mm is a little extreme in some cases.
373
-          for (uint8_t x = (UBL_MESH_NUM_X_POINTS) / 3; x < 2 * (UBL_MESH_NUM_X_POINTS) / 3; x++)   // Create a rectangular raised area in
374
-            for (uint8_t y = (UBL_MESH_NUM_Y_POINTS) / 3; y < 2 * (UBL_MESH_NUM_Y_POINTS) / 3; y++) // the center of the bed
373
+          for (uint8_t x = (GRID_MAX_POINTS_X) / 3; x < 2 * (GRID_MAX_POINTS_X) / 3; x++)   // Create a rectangular raised area in
374
+            for (uint8_t y = (GRID_MAX_POINTS_Y) / 3; y < 2 * (GRID_MAX_POINTS_Y) / 3; y++) // the center of the bed
375
               ubl.z_values[x][y] += code_seen('C') ? ubl_constant : 9.99;
375
               ubl.z_values[x][y] += code_seen('C') ? ubl_constant : 9.99;
376
           break;
376
           break;
377
       }
377
       }
592
 
592
 
593
       if (storage_slot == -1) {                     // Special case, we are going to 'Export' the mesh to the
593
       if (storage_slot == -1) {                     // Special case, we are going to 'Export' the mesh to the
594
         SERIAL_ECHOLNPGM("G29 I 999");              // host in a form it can be reconstructed on a different machine
594
         SERIAL_ECHOLNPGM("G29 I 999");              // host in a form it can be reconstructed on a different machine
595
-        for (uint8_t x = 0; x < UBL_MESH_NUM_X_POINTS; x++)
596
-          for (uint8_t y = 0;  y < UBL_MESH_NUM_Y_POINTS; y++)
595
+        for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
596
+          for (uint8_t y = 0;  y < GRID_MAX_POINTS_Y; y++)
597
             if (!isnan(ubl.z_values[x][y])) {
597
             if (!isnan(ubl.z_values[x][y])) {
598
               SERIAL_ECHOPAIR("M421 I ", x);
598
               SERIAL_ECHOPAIR("M421 I ", x);
599
               SERIAL_ECHOPAIR(" J ", y);
599
               SERIAL_ECHOPAIR(" J ", y);
694
 
694
 
695
     sum = sum_of_diff_squared = 0.0;
695
     sum = sum_of_diff_squared = 0.0;
696
     n = 0;
696
     n = 0;
697
-    for (x = 0; x < UBL_MESH_NUM_X_POINTS; x++)
698
-      for (y = 0; y < UBL_MESH_NUM_Y_POINTS; y++)
697
+    for (x = 0; x < GRID_MAX_POINTS_X; x++)
698
+      for (y = 0; y < GRID_MAX_POINTS_Y; y++)
699
         if (!isnan(ubl.z_values[x][y])) {
699
         if (!isnan(ubl.z_values[x][y])) {
700
           sum += ubl.z_values[x][y];
700
           sum += ubl.z_values[x][y];
701
           n++;
701
           n++;
706
     //
706
     //
707
     // Now do the sumation of the squares of difference from mean
707
     // Now do the sumation of the squares of difference from mean
708
     //
708
     //
709
-    for (x = 0; x < UBL_MESH_NUM_X_POINTS; x++)
710
-      for (y = 0; y < UBL_MESH_NUM_Y_POINTS; y++)
709
+    for (x = 0; x < GRID_MAX_POINTS_X; x++)
710
+      for (y = 0; y < GRID_MAX_POINTS_Y; y++)
711
         if (!isnan(ubl.z_values[x][y])) {
711
         if (!isnan(ubl.z_values[x][y])) {
712
           difference = (ubl.z_values[x][y] - mean);
712
           difference = (ubl.z_values[x][y] - mean);
713
           sum_of_diff_squared += difference * difference;
713
           sum_of_diff_squared += difference * difference;
724
     SERIAL_EOL;
724
     SERIAL_EOL;
725
 
725
 
726
     if (c_flag)
726
     if (c_flag)
727
-      for (x = 0; x < UBL_MESH_NUM_X_POINTS; x++)
728
-        for (y = 0; y < UBL_MESH_NUM_Y_POINTS; y++)
727
+      for (x = 0; x < GRID_MAX_POINTS_X; x++)
728
+        for (y = 0; y < GRID_MAX_POINTS_Y; y++)
729
           if (!isnan(ubl.z_values[x][y]))
729
           if (!isnan(ubl.z_values[x][y]))
730
             ubl.z_values[x][y] -= mean + ubl_constant;
730
             ubl.z_values[x][y] -= mean + ubl_constant;
731
   }
731
   }
732
 
732
 
733
   void shift_mesh_height() {
733
   void shift_mesh_height() {
734
-    for (uint8_t x = 0; x < UBL_MESH_NUM_X_POINTS; x++)
735
-      for (uint8_t y = 0; y < UBL_MESH_NUM_Y_POINTS; y++)
734
+    for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
735
+      for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
736
         if (!isnan(ubl.z_values[x][y]))
736
         if (!isnan(ubl.z_values[x][y]))
737
           ubl.z_values[x][y] += ubl_constant;
737
           ubl.z_values[x][y] += ubl_constant;
738
   }
738
   }
848
     SERIAL_ECHO_F(c, 6);
848
     SERIAL_ECHO_F(c, 6);
849
     SERIAL_EOL;
849
     SERIAL_EOL;
850
 
850
 
851
-    for (i = 0; i < UBL_MESH_NUM_X_POINTS; i++) {
852
-      for (j = 0; j < UBL_MESH_NUM_Y_POINTS; j++) {
851
+    for (i = 0; i < GRID_MAX_POINTS_X; i++) {
852
+      for (j = 0; j < GRID_MAX_POINTS_Y; j++) {
853
         c = -((normal.x * (UBL_MESH_MIN_X + i * (MESH_X_DIST)) + normal.y * (UBL_MESH_MIN_Y + j * (MESH_Y_DIST))) - d);
853
         c = -((normal.x * (UBL_MESH_MIN_X + i * (MESH_X_DIST)) + normal.y * (UBL_MESH_MIN_Y + j * (MESH_Y_DIST))) - d);
854
         ubl.z_values[i][j] += c;
854
         ubl.z_values[i][j] += c;
855
       }
855
       }
1148
     safe_delay(50);
1148
     safe_delay(50);
1149
 
1149
 
1150
     SERIAL_PROTOCOLPGM("X-Axis Mesh Points at: ");
1150
     SERIAL_PROTOCOLPGM("X-Axis Mesh Points at: ");
1151
-    for (uint8_t i = 0; i < UBL_MESH_NUM_X_POINTS; i++) {
1151
+    for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
1152
       SERIAL_PROTOCOL_F(LOGICAL_X_POSITION(ubl.mesh_index_to_xpos[i]), 1);
1152
       SERIAL_PROTOCOL_F(LOGICAL_X_POSITION(ubl.mesh_index_to_xpos[i]), 1);
1153
       SERIAL_PROTOCOLPGM("  ");
1153
       SERIAL_PROTOCOLPGM("  ");
1154
       safe_delay(50);
1154
       safe_delay(50);
1156
     SERIAL_EOL;
1156
     SERIAL_EOL;
1157
 
1157
 
1158
     SERIAL_PROTOCOLPGM("Y-Axis Mesh Points at: ");
1158
     SERIAL_PROTOCOLPGM("Y-Axis Mesh Points at: ");
1159
-    for (uint8_t i = 0; i < UBL_MESH_NUM_Y_POINTS; i++) {
1159
+    for (uint8_t i = 0; i < GRID_MAX_POINTS_Y; i++) {
1160
       SERIAL_PROTOCOL_F(LOGICAL_Y_POSITION(ubl.mesh_index_to_ypos[i]), 1);
1160
       SERIAL_PROTOCOL_F(LOGICAL_Y_POSITION(ubl.mesh_index_to_ypos[i]), 1);
1161
       SERIAL_PROTOCOLPGM("  ");
1161
       SERIAL_PROTOCOLPGM("  ");
1162
       safe_delay(50);
1162
       safe_delay(50);
1195
 
1195
 
1196
     SERIAL_PROTOCOLPAIR("sizeof(ubl.state) : ", (int)sizeof(ubl.state));
1196
     SERIAL_PROTOCOLPAIR("sizeof(ubl.state) : ", (int)sizeof(ubl.state));
1197
 
1197
 
1198
-    SERIAL_PROTOCOLPAIR("\nUBL_MESH_NUM_X_POINTS  ", UBL_MESH_NUM_X_POINTS);
1199
-    SERIAL_PROTOCOLPAIR("\nUBL_MESH_NUM_Y_POINTS  ", UBL_MESH_NUM_Y_POINTS);
1198
+    SERIAL_PROTOCOLPAIR("\nGRID_MAX_POINTS_X  ", GRID_MAX_POINTS_X);
1199
+    SERIAL_PROTOCOLPAIR("\nGRID_MAX_POINTS_Y  ", GRID_MAX_POINTS_Y);
1200
     safe_delay(50);
1200
     safe_delay(50);
1201
     SERIAL_PROTOCOLPAIR("\nUBL_MESH_MIN_X         ", UBL_MESH_MIN_X);
1201
     SERIAL_PROTOCOLPAIR("\nUBL_MESH_MIN_X         ", UBL_MESH_MIN_X);
1202
     SERIAL_PROTOCOLPAIR("\nUBL_MESH_MIN_Y         ", UBL_MESH_MIN_Y);
1202
     SERIAL_PROTOCOLPAIR("\nUBL_MESH_MIN_Y         ", UBL_MESH_MIN_Y);
1245
    * use cases for the users. So we can wait and see what to do with it.
1245
    * use cases for the users. So we can wait and see what to do with it.
1246
    */
1246
    */
1247
   void g29_compare_current_mesh_to_stored_mesh() {
1247
   void g29_compare_current_mesh_to_stored_mesh() {
1248
-    float tmp_z_values[UBL_MESH_NUM_X_POINTS][UBL_MESH_NUM_Y_POINTS];
1248
+    float tmp_z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
1249
 
1249
 
1250
     if (!code_has_value()) {
1250
     if (!code_has_value()) {
1251
       SERIAL_PROTOCOLLNPGM("?Mesh # required.\n");
1251
       SERIAL_PROTOCOLLNPGM("?Mesh # required.\n");
1267
     SERIAL_PROTOCOLLNPAIR(" loaded from EEPROM address 0x", hex_word(j)); // Soon, we can remove the extra clutter of printing
1267
     SERIAL_PROTOCOLLNPAIR(" loaded from EEPROM address 0x", hex_word(j)); // Soon, we can remove the extra clutter of printing
1268
                                                                         // the address in the EEPROM where the Mesh is stored.
1268
                                                                         // the address in the EEPROM where the Mesh is stored.
1269
 
1269
 
1270
-    for (uint8_t x = 0; x < UBL_MESH_NUM_X_POINTS; x++)
1271
-      for (uint8_t y = 0; y < UBL_MESH_NUM_Y_POINTS; y++)
1270
+    for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
1271
+      for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
1272
         ubl.z_values[x][y] -= tmp_z_values[x][y];
1272
         ubl.z_values[x][y] -= tmp_z_values[x][y];
1273
   }
1273
   }
1274
 
1274
 
1285
     const float px = lx - (probe_as_reference ? X_PROBE_OFFSET_FROM_EXTRUDER : 0),
1285
     const float px = lx - (probe_as_reference ? X_PROBE_OFFSET_FROM_EXTRUDER : 0),
1286
                 py = ly - (probe_as_reference ? Y_PROBE_OFFSET_FROM_EXTRUDER : 0);
1286
                 py = ly - (probe_as_reference ? Y_PROBE_OFFSET_FROM_EXTRUDER : 0);
1287
 
1287
 
1288
-    for (uint8_t i = 0; i < UBL_MESH_NUM_X_POINTS; i++) {
1289
-      for (uint8_t j = 0; j < UBL_MESH_NUM_Y_POINTS; j++) {
1288
+    for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
1289
+      for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
1290
 
1290
 
1291
         if ( (type == INVALID && isnan(ubl.z_values[i][j]))  // Check to see if this location holds the right thing
1291
         if ( (type == INVALID && isnan(ubl.z_values[i][j]))  // Check to see if this location holds the right thing
1292
           || (type == REAL && !isnan(ubl.z_values[i][j]))
1292
           || (type == REAL && !isnan(ubl.z_values[i][j]))
1314
           distance = HYPOT(px - mx, py - my) + HYPOT(current_x - mx, current_y - my) * 0.1;
1314
           distance = HYPOT(px - mx, py - my) + HYPOT(current_x - mx, current_y - my) * 0.1;
1315
 
1315
 
1316
           if (far_flag) {                                           // If doing the far_flag action, we want to be as far as possible
1316
           if (far_flag) {                                           // If doing the far_flag action, we want to be as far as possible
1317
-            for (uint8_t k = 0; k < UBL_MESH_NUM_X_POINTS; k++) {   // from the starting point and from any other probed points.  We
1318
-              for (uint8_t l = 0; l < UBL_MESH_NUM_Y_POINTS; l++) { // want the next point spread out and filling in any blank spaces
1317
+            for (uint8_t k = 0; k < GRID_MAX_POINTS_X; k++) {   // from the starting point and from any other probed points.  We
1318
+              for (uint8_t l = 0; l < GRID_MAX_POINTS_Y; l++) { // want the next point spread out and filling in any blank spaces
1319
                 if (!isnan(ubl.z_values[k][l])) {                       // in the mesh. So we add in some of the distance to every probed
1319
                 if (!isnan(ubl.z_values[k][l])) {                       // in the mesh. So we add in some of the distance to every probed
1320
                   distance += sq(i - k) * (MESH_X_DIST) * .05       // point we can find.
1320
                   distance += sq(i - k) * (MESH_X_DIST) * .05       // point we can find.
1321
                             + sq(j - l) * (MESH_Y_DIST) * .05;
1321
                             + sq(j - l) * (MESH_Y_DIST) * .05;

+ 1
- 1
Marlin/UBL_line_to_destination.cpp 查看文件

135
        * But we detect it and isolate it. For now, we just pass along the request.
135
        * But we detect it and isolate it. For now, we just pass along the request.
136
        */
136
        */
137
 
137
 
138
-      if (!WITHIN(cell_dest_xi, 0, UBL_MESH_NUM_X_POINTS - 1) || !WITHIN(cell_dest_yi, 0, UBL_MESH_NUM_Y_POINTS - 1)) {
138
+      if (!WITHIN(cell_dest_xi, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(cell_dest_yi, 0, GRID_MAX_POINTS_Y - 1)) {
139
 
139
 
140
         // Note: There is no Z Correction in this case. We are off the grid and don't know what
140
         // Note: There is no Z Correction in this case. We are off the grid and don't know what
141
         // a reasonable correction would be.
141
         // a reasonable correction would be.

+ 18
- 18
Marlin/configuration_store.cpp 查看文件

67
  * Mesh bed leveling:
67
  * Mesh bed leveling:
68
  *  219  M420 S    from mbl.status (bool)
68
  *  219  M420 S    from mbl.status (bool)
69
  *  220            mbl.z_offset (float)
69
  *  220            mbl.z_offset (float)
70
- *  224            MESH_NUM_X_POINTS (uint8 as set in firmware)
71
- *  225            MESH_NUM_Y_POINTS (uint8 as set in firmware)
70
+ *  224            GRID_MAX_POINTS_X (uint8 as set in firmware)
71
+ *  225            GRID_MAX_POINTS_Y (uint8 as set in firmware)
72
  *  226 G29 S3 XYZ z_values[][] (float x9, by default, up to float x 81) +288
72
  *  226 G29 S3 XYZ z_values[][] (float x9, by default, up to float x 81) +288
73
  *
73
  *
74
  * AUTO BED LEVELING
74
  * AUTO BED LEVELING
78
  *  266            planner.bed_level_matrix        (matrix_3x3 = float x9)
78
  *  266            planner.bed_level_matrix        (matrix_3x3 = float x9)
79
  *
79
  *
80
  * AUTO_BED_LEVELING_BILINEAR (or placeholder):    47 bytes
80
  * AUTO_BED_LEVELING_BILINEAR (or placeholder):    47 bytes
81
- *  302            ABL_GRID_MAX_POINTS_X           (uint8_t)
82
- *  303            ABL_GRID_MAX_POINTS_Y           (uint8_t)
81
+ *  302            GRID_MAX_POINTS_X               (uint8_t)
82
+ *  303            GRID_MAX_POINTS_Y               (uint8_t)
83
  *  304            bilinear_grid_spacing           (int x2)   from G29: (B-F)/X, (R-L)/Y
83
  *  304            bilinear_grid_spacing           (int x2)   from G29: (B-F)/X, (R-L)/Y
84
  *  308  G29 L F   bilinear_start                  (int x2)
84
  *  308  G29 L F   bilinear_start                  (int x2)
85
  *  312            bed_level_grid[][]              (float x9, up to float x256) +988
85
  *  312            bed_level_grid[][]              (float x9, up to float x256) +988
294
 
294
 
295
     #if ENABLED(MESH_BED_LEVELING)
295
     #if ENABLED(MESH_BED_LEVELING)
296
       // Compile time test that sizeof(mbl.z_values) is as expected
296
       // Compile time test that sizeof(mbl.z_values) is as expected
297
-      typedef char c_assert[(sizeof(mbl.z_values) == (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS) * sizeof(dummy)) ? 1 : -1];
297
+      typedef char c_assert[(sizeof(mbl.z_values) == (GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y) * sizeof(dummy)) ? 1 : -1];
298
       const bool leveling_is_on = TEST(mbl.status, MBL_STATUS_HAS_MESH_BIT);
298
       const bool leveling_is_on = TEST(mbl.status, MBL_STATUS_HAS_MESH_BIT);
299
-      const uint8_t mesh_num_x = MESH_NUM_X_POINTS, mesh_num_y = MESH_NUM_Y_POINTS;
299
+      const uint8_t mesh_num_x = GRID_MAX_POINTS_X, mesh_num_y = GRID_MAX_POINTS_Y;
300
       EEPROM_WRITE(leveling_is_on);
300
       EEPROM_WRITE(leveling_is_on);
301
       EEPROM_WRITE(mbl.z_offset);
301
       EEPROM_WRITE(mbl.z_offset);
302
       EEPROM_WRITE(mesh_num_x);
302
       EEPROM_WRITE(mesh_num_x);
336
 
336
 
337
     #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
337
     #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
338
       // Compile time test that sizeof(bed_level_grid) is as expected
338
       // Compile time test that sizeof(bed_level_grid) is as expected
339
-      typedef char c_assert[(sizeof(bed_level_grid) == (ABL_GRID_MAX_POINTS_X) * (ABL_GRID_MAX_POINTS_Y) * sizeof(dummy)) ? 1 : -1];
340
-      const uint8_t grid_max_x = ABL_GRID_MAX_POINTS_X, grid_max_y = ABL_GRID_MAX_POINTS_Y;
339
+      typedef char c_assert[(sizeof(bed_level_grid) == (GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y) * sizeof(dummy)) ? 1 : -1];
340
+      const uint8_t grid_max_x = GRID_MAX_POINTS_X, grid_max_y = GRID_MAX_POINTS_Y;
341
       EEPROM_WRITE(grid_max_x);            // 1 byte
341
       EEPROM_WRITE(grid_max_x);            // 1 byte
342
       EEPROM_WRITE(grid_max_y);            // 1 byte
342
       EEPROM_WRITE(grid_max_y);            // 1 byte
343
       EEPROM_WRITE(bilinear_grid_spacing); // 2 ints
343
       EEPROM_WRITE(bilinear_grid_spacing); // 2 ints
631
       #if ENABLED(MESH_BED_LEVELING)
631
       #if ENABLED(MESH_BED_LEVELING)
632
         mbl.status = leveling_is_on ? _BV(MBL_STATUS_HAS_MESH_BIT) : 0;
632
         mbl.status = leveling_is_on ? _BV(MBL_STATUS_HAS_MESH_BIT) : 0;
633
         mbl.z_offset = dummy;
633
         mbl.z_offset = dummy;
634
-        if (mesh_num_x == MESH_NUM_X_POINTS && mesh_num_y == MESH_NUM_Y_POINTS) {
634
+        if (mesh_num_x == GRID_MAX_POINTS_X && mesh_num_y == GRID_MAX_POINTS_Y) {
635
           // EEPROM data fits the current mesh
635
           // EEPROM data fits the current mesh
636
           EEPROM_READ(mbl.z_values);
636
           EEPROM_READ(mbl.z_values);
637
         }
637
         }
668
       EEPROM_READ(grid_max_x);                       // 1 byte
668
       EEPROM_READ(grid_max_x);                       // 1 byte
669
       EEPROM_READ(grid_max_y);                       // 1 byte
669
       EEPROM_READ(grid_max_y);                       // 1 byte
670
       #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
670
       #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
671
-        if (grid_max_x == ABL_GRID_MAX_POINTS_X && grid_max_y == ABL_GRID_MAX_POINTS_Y) {
671
+        if (grid_max_x == GRID_MAX_POINTS_X && grid_max_y == GRID_MAX_POINTS_Y) {
672
           set_bed_leveling_enabled(false);
672
           set_bed_leveling_enabled(false);
673
           EEPROM_READ(bilinear_grid_spacing);        // 2 ints
673
           EEPROM_READ(bilinear_grid_spacing);        // 2 ints
674
           EEPROM_READ(bilinear_start);               // 2 ints
674
           EEPROM_READ(bilinear_start);               // 2 ints
1203
         CONFIG_ECHO_START;
1203
         CONFIG_ECHO_START;
1204
       }
1204
       }
1205
       SERIAL_ECHOLNPAIR("  M420 S", mbl.has_mesh() ? 1 : 0);
1205
       SERIAL_ECHOLNPAIR("  M420 S", mbl.has_mesh() ? 1 : 0);
1206
-      for (uint8_t py = 1; py <= MESH_NUM_Y_POINTS; py++) {
1207
-        for (uint8_t px = 1; px <= MESH_NUM_X_POINTS; px++) {
1206
+      for (uint8_t py = 1; py <= GRID_MAX_POINTS_Y; py++) {
1207
+        for (uint8_t px = 1; px <= GRID_MAX_POINTS_X; px++) {
1208
           CONFIG_ECHO_START;
1208
           CONFIG_ECHO_START;
1209
           SERIAL_ECHOPAIR("  G29 S3 X", (int)px);
1209
           SERIAL_ECHOPAIR("  G29 S3 X", (int)px);
1210
           SERIAL_ECHOPAIR(" Y", (int)py);
1210
           SERIAL_ECHOPAIR(" Y", (int)py);
1235
         SERIAL_ECHOPAIR("EEPROM can hold ", (int)((UBL_LAST_EEPROM_INDEX - ubl.eeprom_start) / sizeof(ubl.z_values)));
1235
         SERIAL_ECHOPAIR("EEPROM can hold ", (int)((UBL_LAST_EEPROM_INDEX - ubl.eeprom_start) / sizeof(ubl.z_values)));
1236
         SERIAL_ECHOLNPGM(" meshes.\n");
1236
         SERIAL_ECHOLNPGM(" meshes.\n");
1237
 
1237
 
1238
-        SERIAL_ECHOLNPGM("UBL_MESH_NUM_X_POINTS  " STRINGIFY(UBL_MESH_NUM_X_POINTS));
1239
-        SERIAL_ECHOLNPGM("UBL_MESH_NUM_Y_POINTS  " STRINGIFY(UBL_MESH_NUM_Y_POINTS));
1238
+        SERIAL_ECHOLNPGM("GRID_MAX_POINTS_X  " STRINGIFY(GRID_MAX_POINTS_X));
1239
+        SERIAL_ECHOLNPGM("GRID_MAX_POINTS_Y  " STRINGIFY(GRID_MAX_POINTS_Y));
1240
 
1240
 
1241
-        SERIAL_ECHOLNPGM("UBL_MESH_MIN_X         " STRINGIFY(UBL_MESH_MIN_X));
1242
-        SERIAL_ECHOLNPGM("UBL_MESH_MIN_Y         " STRINGIFY(UBL_MESH_MIN_Y));
1241
+        SERIAL_ECHOLNPGM("UBL_MESH_MIN_X     " STRINGIFY(UBL_MESH_MIN_X));
1242
+        SERIAL_ECHOLNPGM("UBL_MESH_MIN_Y     " STRINGIFY(UBL_MESH_MIN_Y));
1243
 
1243
 
1244
-        SERIAL_ECHOLNPGM("UBL_MESH_MAX_X         " STRINGIFY(UBL_MESH_MAX_X));
1245
-        SERIAL_ECHOLNPGM("UBL_MESH_MAX_Y         " STRINGIFY(UBL_MESH_MAX_Y));
1244
+        SERIAL_ECHOLNPGM("UBL_MESH_MAX_X     " STRINGIFY(UBL_MESH_MAX_X));
1245
+        SERIAL_ECHOLNPGM("UBL_MESH_MAX_Y     " STRINGIFY(UBL_MESH_MAX_Y));
1246
 
1246
 
1247
         SERIAL_ECHOLNPGM("MESH_X_DIST        " STRINGIFY(MESH_X_DIST));
1247
         SERIAL_ECHOLNPGM("MESH_X_DIST        " STRINGIFY(MESH_X_DIST));
1248
         SERIAL_ECHOLNPGM("MESH_Y_DIST        " STRINGIFY(MESH_Y_DIST));
1248
         SERIAL_ECHOLNPGM("MESH_Y_DIST        " STRINGIFY(MESH_Y_DIST));

+ 6
- 6
Marlin/example_configurations/Cartesio/Configuration.h 查看文件

813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
814
 
814
 
815
   // Set the number of grid points per dimension.
815
   // Set the number of grid points per dimension.
816
-  #define ABL_GRID_MAX_POINTS_X 3
817
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
816
+  #define GRID_MAX_POINTS_X 3
817
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
818
 
818
 
819
   // Set the boundaries for probing (where the probe can reach).
819
   // Set the boundaries for probing (where the probe can reach).
820
   #define LEFT_PROBE_BED_POSITION 15
820
   #define LEFT_PROBE_BED_POSITION 15
860
   //===========================================================================
860
   //===========================================================================
861
 
861
 
862
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
862
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
863
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
864
-  #define UBL_MESH_NUM_Y_POINTS 10
863
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
864
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
867
   #define UBL_PROBE_PT_2_X 39
867
   #define UBL_PROBE_PT_2_X 39
877
   //===========================================================================
877
   //===========================================================================
878
 
878
 
879
   #define MESH_INSET 10          // Mesh inset margin on print area
879
   #define MESH_INSET 10          // Mesh inset margin on print area
880
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
881
-  #define MESH_NUM_Y_POINTS 3
880
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
881
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
882
 
882
 
883
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
883
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
884
 
884
 

+ 6
- 6
Marlin/example_configurations/Felix/Configuration.h 查看文件

796
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
796
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
797
 
797
 
798
   // Set the number of grid points per dimension.
798
   // Set the number of grid points per dimension.
799
-  #define ABL_GRID_MAX_POINTS_X 3
800
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
799
+  #define GRID_MAX_POINTS_X 3
800
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
801
 
801
 
802
   // Set the boundaries for probing (where the probe can reach).
802
   // Set the boundaries for probing (where the probe can reach).
803
   #define LEFT_PROBE_BED_POSITION 15
803
   #define LEFT_PROBE_BED_POSITION 15
843
   //===========================================================================
843
   //===========================================================================
844
 
844
 
845
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
845
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
846
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
847
-  #define UBL_MESH_NUM_Y_POINTS 10
846
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
847
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
848
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
848
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
849
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
849
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
850
   #define UBL_PROBE_PT_2_X 39
850
   #define UBL_PROBE_PT_2_X 39
860
   //===========================================================================
860
   //===========================================================================
861
 
861
 
862
   #define MESH_INSET 10          // Mesh inset margin on print area
862
   #define MESH_INSET 10          // Mesh inset margin on print area
863
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
864
-  #define MESH_NUM_Y_POINTS 3
863
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
864
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
865
 
865
 
866
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
866
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
867
 
867
 

+ 6
- 6
Marlin/example_configurations/Felix/DUAL/Configuration.h 查看文件

796
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
796
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
797
 
797
 
798
   // Set the number of grid points per dimension.
798
   // Set the number of grid points per dimension.
799
-  #define ABL_GRID_MAX_POINTS_X 3
800
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
799
+  #define GRID_MAX_POINTS_X 3
800
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
801
 
801
 
802
   // Set the boundaries for probing (where the probe can reach).
802
   // Set the boundaries for probing (where the probe can reach).
803
   #define LEFT_PROBE_BED_POSITION 15
803
   #define LEFT_PROBE_BED_POSITION 15
843
   //===========================================================================
843
   //===========================================================================
844
 
844
 
845
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
845
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
846
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
847
-  #define UBL_MESH_NUM_Y_POINTS 10
846
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
847
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
848
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
848
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
849
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
849
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
850
   #define UBL_PROBE_PT_2_X 39
850
   #define UBL_PROBE_PT_2_X 39
860
   //===========================================================================
860
   //===========================================================================
861
 
861
 
862
   #define MESH_INSET 10          // Mesh inset margin on print area
862
   #define MESH_INSET 10          // Mesh inset margin on print area
863
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
864
-  #define MESH_NUM_Y_POINTS 3
863
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
864
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
865
 
865
 
866
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
866
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
867
 
867
 

+ 6
- 6
Marlin/example_configurations/Hephestos/Configuration.h 查看文件

805
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
805
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
806
 
806
 
807
   // Set the number of grid points per dimension.
807
   // Set the number of grid points per dimension.
808
-  #define ABL_GRID_MAX_POINTS_X 3
809
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
808
+  #define GRID_MAX_POINTS_X 3
809
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
810
 
810
 
811
   // Set the boundaries for probing (where the probe can reach).
811
   // Set the boundaries for probing (where the probe can reach).
812
   #define LEFT_PROBE_BED_POSITION 15
812
   #define LEFT_PROBE_BED_POSITION 15
852
   //===========================================================================
852
   //===========================================================================
853
 
853
 
854
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
854
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
855
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
856
-  #define UBL_MESH_NUM_Y_POINTS 10
855
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
856
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
857
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
857
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
858
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
858
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
859
   #define UBL_PROBE_PT_2_X 39
859
   #define UBL_PROBE_PT_2_X 39
869
   //===========================================================================
869
   //===========================================================================
870
 
870
 
871
   #define MESH_INSET 10          // Mesh inset margin on print area
871
   #define MESH_INSET 10          // Mesh inset margin on print area
872
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
873
-  #define MESH_NUM_Y_POINTS 3
872
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
873
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
874
 
874
 
875
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
875
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
876
 
876
 

+ 6
- 6
Marlin/example_configurations/Hephestos_2/Configuration.h 查看文件

807
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
807
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
808
 
808
 
809
   // Set the number of grid points per dimension.
809
   // Set the number of grid points per dimension.
810
-  #define ABL_GRID_MAX_POINTS_X 3
811
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
810
+  #define GRID_MAX_POINTS_X 3
811
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
812
 
812
 
813
   // Set the boundaries for probing (where the probe can reach).
813
   // Set the boundaries for probing (where the probe can reach).
814
   #define LEFT_PROBE_BED_POSITION  X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER
814
   #define LEFT_PROBE_BED_POSITION  X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER
854
   //===========================================================================
854
   //===========================================================================
855
 
855
 
856
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
856
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
857
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
858
-  #define UBL_MESH_NUM_Y_POINTS 10
857
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
858
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
859
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
859
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
860
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
860
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
861
   #define UBL_PROBE_PT_2_X 39
861
   #define UBL_PROBE_PT_2_X 39
871
   //===========================================================================
871
   //===========================================================================
872
 
872
 
873
   #define MESH_INSET 10          // Mesh inset margin on print area
873
   #define MESH_INSET 10          // Mesh inset margin on print area
874
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
875
-  #define MESH_NUM_Y_POINTS 3
874
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
875
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
876
 
876
 
877
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
877
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
878
 
878
 

+ 6
- 6
Marlin/example_configurations/K8200/Configuration.h 查看文件

842
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
842
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
843
 
843
 
844
   // Set the number of grid points per dimension.
844
   // Set the number of grid points per dimension.
845
-  #define ABL_GRID_MAX_POINTS_X 3
846
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
845
+  #define GRID_MAX_POINTS_X 3
846
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
847
 
847
 
848
   // Set the boundaries for probing (where the probe can reach).
848
   // Set the boundaries for probing (where the probe can reach).
849
   #define LEFT_PROBE_BED_POSITION 15
849
   #define LEFT_PROBE_BED_POSITION 15
889
   //===========================================================================
889
   //===========================================================================
890
 
890
 
891
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
891
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
892
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
893
-  #define UBL_MESH_NUM_Y_POINTS 10
892
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
893
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
894
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
894
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
895
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
895
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
896
   #define UBL_PROBE_PT_2_X 39
896
   #define UBL_PROBE_PT_2_X 39
906
   //===========================================================================
906
   //===========================================================================
907
 
907
 
908
   #define MESH_INSET 10          // Mesh inset margin on print area
908
   #define MESH_INSET 10          // Mesh inset margin on print area
909
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
910
-  #define MESH_NUM_Y_POINTS 3
909
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
910
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
911
 
911
 
912
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
912
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
913
 
913
 

+ 6
- 6
Marlin/example_configurations/K8400/Configuration.h 查看文件

813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
814
 
814
 
815
   // Set the number of grid points per dimension.
815
   // Set the number of grid points per dimension.
816
-  #define ABL_GRID_MAX_POINTS_X 3
817
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
816
+  #define GRID_MAX_POINTS_X 3
817
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
818
 
818
 
819
   // Set the boundaries for probing (where the probe can reach).
819
   // Set the boundaries for probing (where the probe can reach).
820
   #define LEFT_PROBE_BED_POSITION 15
820
   #define LEFT_PROBE_BED_POSITION 15
860
   //===========================================================================
860
   //===========================================================================
861
 
861
 
862
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
862
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
863
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
864
-  #define UBL_MESH_NUM_Y_POINTS 10
863
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
864
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
867
   #define UBL_PROBE_PT_2_X 39
867
   #define UBL_PROBE_PT_2_X 39
877
   //===========================================================================
877
   //===========================================================================
878
 
878
 
879
   #define MESH_INSET 10          // Mesh inset margin on print area
879
   #define MESH_INSET 10          // Mesh inset margin on print area
880
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
881
-  #define MESH_NUM_Y_POINTS 3
880
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
881
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
882
 
882
 
883
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
883
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
884
 
884
 

+ 6
- 6
Marlin/example_configurations/K8400/Dual-head/Configuration.h 查看文件

813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
814
 
814
 
815
   // Set the number of grid points per dimension.
815
   // Set the number of grid points per dimension.
816
-  #define ABL_GRID_MAX_POINTS_X 3
817
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
816
+  #define GRID_MAX_POINTS_X 3
817
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
818
 
818
 
819
   // Set the boundaries for probing (where the probe can reach).
819
   // Set the boundaries for probing (where the probe can reach).
820
   #define LEFT_PROBE_BED_POSITION 15
820
   #define LEFT_PROBE_BED_POSITION 15
860
   //===========================================================================
860
   //===========================================================================
861
 
861
 
862
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
862
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
863
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
864
-  #define UBL_MESH_NUM_Y_POINTS 10
863
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
864
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
867
   #define UBL_PROBE_PT_2_X 39
867
   #define UBL_PROBE_PT_2_X 39
877
   //===========================================================================
877
   //===========================================================================
878
 
878
 
879
   #define MESH_INSET 10          // Mesh inset margin on print area
879
   #define MESH_INSET 10          // Mesh inset margin on print area
880
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
881
-  #define MESH_NUM_Y_POINTS 3
880
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
881
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
882
 
882
 
883
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
883
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
884
 
884
 

+ 6
- 6
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h 查看文件

813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
814
 
814
 
815
   // Set the number of grid points per dimension.
815
   // Set the number of grid points per dimension.
816
-  #define ABL_GRID_MAX_POINTS_X 3
817
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
816
+  #define GRID_MAX_POINTS_X 3
817
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
818
 
818
 
819
   // Set the boundaries for probing (where the probe can reach).
819
   // Set the boundaries for probing (where the probe can reach).
820
   #define LEFT_PROBE_BED_POSITION 15
820
   #define LEFT_PROBE_BED_POSITION 15
860
   //===========================================================================
860
   //===========================================================================
861
 
861
 
862
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
862
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
863
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
864
-  #define UBL_MESH_NUM_Y_POINTS 10
863
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
864
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
867
   #define UBL_PROBE_PT_2_X 39
867
   #define UBL_PROBE_PT_2_X 39
877
   //===========================================================================
877
   //===========================================================================
878
 
878
 
879
   #define MESH_INSET 10          // Mesh inset margin on print area
879
   #define MESH_INSET 10          // Mesh inset margin on print area
880
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
881
-  #define MESH_NUM_Y_POINTS 3
880
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
881
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
882
 
882
 
883
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
883
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
884
 
884
 

+ 6
- 6
Marlin/example_configurations/RigidBot/Configuration.h 查看文件

812
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
812
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
813
 
813
 
814
   // Set the number of grid points per dimension.
814
   // Set the number of grid points per dimension.
815
-  #define ABL_GRID_MAX_POINTS_X 3
816
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
815
+  #define GRID_MAX_POINTS_X 3
816
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
817
 
817
 
818
   // Set the boundaries for probing (where the probe can reach).
818
   // Set the boundaries for probing (where the probe can reach).
819
   #define LEFT_PROBE_BED_POSITION 15
819
   #define LEFT_PROBE_BED_POSITION 15
859
   //===========================================================================
859
   //===========================================================================
860
 
860
 
861
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
861
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
862
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
863
-  #define UBL_MESH_NUM_Y_POINTS 10
862
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
863
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
864
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
864
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
865
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
865
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
866
   #define UBL_PROBE_PT_2_X 39
866
   #define UBL_PROBE_PT_2_X 39
876
   //===========================================================================
876
   //===========================================================================
877
 
877
 
878
   #define MESH_INSET 10          // Mesh inset margin on print area
878
   #define MESH_INSET 10          // Mesh inset margin on print area
879
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
880
-  #define MESH_NUM_Y_POINTS 3
879
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
880
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
881
 
881
 
882
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
882
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
883
 
883
 

+ 6
- 6
Marlin/example_configurations/SCARA/Configuration.h 查看文件

828
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
828
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
829
 
829
 
830
   // Set the number of grid points per dimension.
830
   // Set the number of grid points per dimension.
831
-  #define ABL_GRID_MAX_POINTS_X 3
832
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
831
+  #define GRID_MAX_POINTS_X 3
832
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
833
 
833
 
834
   // Set the boundaries for probing (where the probe can reach).
834
   // Set the boundaries for probing (where the probe can reach).
835
   #define LEFT_PROBE_BED_POSITION 15
835
   #define LEFT_PROBE_BED_POSITION 15
875
   //===========================================================================
875
   //===========================================================================
876
 
876
 
877
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
877
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
878
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
879
-  #define UBL_MESH_NUM_Y_POINTS 10
878
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
879
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
880
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
880
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
881
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
881
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
882
   #define UBL_PROBE_PT_2_X 39
882
   #define UBL_PROBE_PT_2_X 39
892
   //===========================================================================
892
   //===========================================================================
893
 
893
 
894
   #define MESH_INSET 10          // Mesh inset margin on print area
894
   #define MESH_INSET 10          // Mesh inset margin on print area
895
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
896
-  #define MESH_NUM_Y_POINTS 3
895
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
896
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
897
 
897
 
898
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
898
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
899
 
899
 

+ 6
- 6
Marlin/example_configurations/TAZ4/Configuration.h 查看文件

834
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
834
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
835
 
835
 
836
   // Set the number of grid points per dimension.
836
   // Set the number of grid points per dimension.
837
-  #define ABL_GRID_MAX_POINTS_X 3
838
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
837
+  #define GRID_MAX_POINTS_X 3
838
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
839
 
839
 
840
   // Set the boundaries for probing (where the probe can reach).
840
   // Set the boundaries for probing (where the probe can reach).
841
   #define LEFT_PROBE_BED_POSITION 15
841
   #define LEFT_PROBE_BED_POSITION 15
881
   //===========================================================================
881
   //===========================================================================
882
 
882
 
883
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
883
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
884
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
885
-  #define UBL_MESH_NUM_Y_POINTS 10
884
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
885
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
886
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
886
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
887
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
887
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
888
   #define UBL_PROBE_PT_2_X 39
888
   #define UBL_PROBE_PT_2_X 39
898
   //===========================================================================
898
   //===========================================================================
899
 
899
 
900
   #define MESH_INSET 10          // Mesh inset margin on print area
900
   #define MESH_INSET 10          // Mesh inset margin on print area
901
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
902
-  #define MESH_NUM_Y_POINTS 3
901
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
902
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
903
 
903
 
904
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
904
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
905
 
905
 

+ 6
- 6
Marlin/example_configurations/TinyBoy2/Configuration.h 查看文件

864
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
864
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
865
 
865
 
866
   // Set the number of grid points per dimension.
866
   // Set the number of grid points per dimension.
867
-  #define ABL_GRID_MAX_POINTS_X 3
868
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
867
+  #define GRID_MAX_POINTS_X 3
868
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
869
 
869
 
870
   // Set the boundaries for probing (where the probe can reach).
870
   // Set the boundaries for probing (where the probe can reach).
871
   #define LEFT_PROBE_BED_POSITION 15
871
   #define LEFT_PROBE_BED_POSITION 15
911
   //===========================================================================
911
   //===========================================================================
912
 
912
 
913
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
913
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
914
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
915
-  #define UBL_MESH_NUM_Y_POINTS 10
914
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
915
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
916
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
916
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
917
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
917
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
918
   #define UBL_PROBE_PT_2_X 39
918
   #define UBL_PROBE_PT_2_X 39
928
   //===========================================================================
928
   //===========================================================================
929
 
929
 
930
   #define MESH_INSET 10          // Mesh inset margin on print area
930
   #define MESH_INSET 10          // Mesh inset margin on print area
931
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
932
-  #define MESH_NUM_Y_POINTS 3
931
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
932
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
933
 
933
 
934
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
934
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
935
 
935
 

+ 6
- 6
Marlin/example_configurations/WITBOX/Configuration.h 查看文件

805
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
805
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
806
 
806
 
807
   // Set the number of grid points per dimension.
807
   // Set the number of grid points per dimension.
808
-  #define ABL_GRID_MAX_POINTS_X 3
809
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
808
+  #define GRID_MAX_POINTS_X 3
809
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
810
 
810
 
811
   // Set the boundaries for probing (where the probe can reach).
811
   // Set the boundaries for probing (where the probe can reach).
812
   #define LEFT_PROBE_BED_POSITION 15
812
   #define LEFT_PROBE_BED_POSITION 15
852
   //===========================================================================
852
   //===========================================================================
853
 
853
 
854
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
854
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
855
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
856
-  #define UBL_MESH_NUM_Y_POINTS 10
855
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
856
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
857
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
857
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
858
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
858
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
859
   #define UBL_PROBE_PT_2_X 39
859
   #define UBL_PROBE_PT_2_X 39
869
   //===========================================================================
869
   //===========================================================================
870
 
870
 
871
   #define MESH_INSET 10          // Mesh inset margin on print area
871
   #define MESH_INSET 10          // Mesh inset margin on print area
872
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
873
-  #define MESH_NUM_Y_POINTS 3
872
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
873
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
874
 
874
 
875
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
875
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
876
 
876
 

+ 6
- 6
Marlin/example_configurations/adafruit/ST7565/Configuration.h 查看文件

813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
814
 
814
 
815
   // Set the number of grid points per dimension.
815
   // Set the number of grid points per dimension.
816
-  #define ABL_GRID_MAX_POINTS_X 3
817
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
816
+  #define GRID_MAX_POINTS_X 3
817
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
818
 
818
 
819
   // Set the boundaries for probing (where the probe can reach).
819
   // Set the boundaries for probing (where the probe can reach).
820
   #define LEFT_PROBE_BED_POSITION 15
820
   #define LEFT_PROBE_BED_POSITION 15
860
   //===========================================================================
860
   //===========================================================================
861
 
861
 
862
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
862
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
863
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
864
-  #define UBL_MESH_NUM_Y_POINTS 10
863
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
864
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
867
   #define UBL_PROBE_PT_2_X 39
867
   #define UBL_PROBE_PT_2_X 39
877
   //===========================================================================
877
   //===========================================================================
878
 
878
 
879
   #define MESH_INSET 10          // Mesh inset margin on print area
879
   #define MESH_INSET 10          // Mesh inset margin on print area
880
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
881
-  #define MESH_NUM_Y_POINTS 3
880
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
881
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
882
 
882
 
883
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
883
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
884
 
884
 

+ 6
- 6
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h 查看文件

919
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
919
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
920
 
920
 
921
   // Set the number of grid points per dimension.
921
   // Set the number of grid points per dimension.
922
-  #define ABL_GRID_MAX_POINTS_X 9
923
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
922
+  #define GRID_MAX_POINTS_X 9
923
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
924
 
924
 
925
   // Set the boundaries for probing (where the probe can reach).
925
   // Set the boundaries for probing (where the probe can reach).
926
   #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 15)
926
   #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 15)
966
   //===========================================================================
966
   //===========================================================================
967
 
967
 
968
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
968
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
969
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
970
-  #define UBL_MESH_NUM_Y_POINTS 10
969
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
970
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
971
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
971
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
972
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
972
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
973
   #define UBL_PROBE_PT_2_X 39
973
   #define UBL_PROBE_PT_2_X 39
983
   //===========================================================================
983
   //===========================================================================
984
 
984
 
985
   #define MESH_INSET 10          // Mesh inset margin on print area
985
   #define MESH_INSET 10          // Mesh inset margin on print area
986
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
987
-  #define MESH_NUM_Y_POINTS 3
986
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
987
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
988
 
988
 
989
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
989
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
990
 
990
 

+ 6
- 6
Marlin/example_configurations/delta/generic/Configuration.h 查看文件

904
 
904
 
905
   // Set the number of grid points per dimension.
905
   // Set the number of grid points per dimension.
906
   // Works best with 5 or more points in each dimension.
906
   // Works best with 5 or more points in each dimension.
907
-  #define ABL_GRID_MAX_POINTS_X 9
908
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
907
+  #define GRID_MAX_POINTS_X 9
908
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
909
 
909
 
910
   // Set the boundaries for probing (where the probe can reach).
910
   // Set the boundaries for probing (where the probe can reach).
911
   #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
911
   #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
951
   //===========================================================================
951
   //===========================================================================
952
 
952
 
953
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
953
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
954
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
955
-  #define UBL_MESH_NUM_Y_POINTS 10
954
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
955
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
956
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
956
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
957
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
957
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
958
   #define UBL_PROBE_PT_2_X 39
958
   #define UBL_PROBE_PT_2_X 39
968
   //===========================================================================
968
   //===========================================================================
969
 
969
 
970
   #define MESH_INSET 10          // Mesh inset margin on print area
970
   #define MESH_INSET 10          // Mesh inset margin on print area
971
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
972
-  #define MESH_NUM_Y_POINTS 3
971
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
972
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
973
 
973
 
974
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
974
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
975
 
975
 

+ 6
- 6
Marlin/example_configurations/delta/kossel_mini/Configuration.h 查看文件

907
 
907
 
908
   // Set the number of grid points per dimension.
908
   // Set the number of grid points per dimension.
909
   // Works best with 5 or more points in each dimension.
909
   // Works best with 5 or more points in each dimension.
910
-  #define ABL_GRID_MAX_POINTS_X 9
911
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
910
+  #define GRID_MAX_POINTS_X 9
911
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
912
 
912
 
913
   // Set the boundaries for probing (where the probe can reach).
913
   // Set the boundaries for probing (where the probe can reach).
914
   #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
914
   #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
955
   //===========================================================================
955
   //===========================================================================
956
 
956
 
957
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
957
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
958
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
959
-  #define UBL_MESH_NUM_Y_POINTS 10
958
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
959
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
960
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
960
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
961
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
961
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
962
   #define UBL_PROBE_PT_2_X 39
962
   #define UBL_PROBE_PT_2_X 39
972
   //===========================================================================
972
   //===========================================================================
973
 
973
 
974
   #define MESH_INSET 10          // Mesh inset margin on print area
974
   #define MESH_INSET 10          // Mesh inset margin on print area
975
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
976
-  #define MESH_NUM_Y_POINTS 3
975
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
976
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
977
 
977
 
978
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
978
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
979
 
979
 

+ 7
- 7
Marlin/example_configurations/delta/kossel_pro/Configuration.h 查看文件

906
 
906
 
907
   // Set the number of grid points per dimension.
907
   // Set the number of grid points per dimension.
908
   // Works best with 5 or more points in each dimension.
908
   // Works best with 5 or more points in each dimension.
909
-  #define ABL_GRID_MAX_POINTS_X 7
910
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
909
+  #define GRID_MAX_POINTS_X 7
910
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
911
 
911
 
912
   // Set the boundaries for probing (where the probe can reach).
912
   // Set the boundaries for probing (where the probe can reach).
913
-  #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS-25)
913
+  #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 25)
914
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
914
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
915
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
915
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
916
   #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
916
   #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
954
   //===========================================================================
954
   //===========================================================================
955
 
955
 
956
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
956
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
957
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
958
-  #define UBL_MESH_NUM_Y_POINTS 10
957
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
958
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
959
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
959
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
960
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
960
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
961
   #define UBL_PROBE_PT_2_X 39
961
   #define UBL_PROBE_PT_2_X 39
971
   //===========================================================================
971
   //===========================================================================
972
 
972
 
973
   #define MESH_INSET 10          // Mesh inset margin on print area
973
   #define MESH_INSET 10          // Mesh inset margin on print area
974
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
975
-  #define MESH_NUM_Y_POINTS 3
974
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
975
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
976
 
976
 
977
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
977
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
978
 
978
 

+ 6
- 6
Marlin/example_configurations/delta/kossel_xl/Configuration.h 查看文件

917
 
917
 
918
   // Set the number of grid points per dimension.
918
   // Set the number of grid points per dimension.
919
   // Works best with 5 or more points in each dimension.
919
   // Works best with 5 or more points in each dimension.
920
-  #define ABL_GRID_MAX_POINTS_X 5
921
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
920
+  #define GRID_MAX_POINTS_X 5
921
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
922
 
922
 
923
   // Set the boundaries for probing (where the probe can reach).
923
   // Set the boundaries for probing (where the probe can reach).
924
   #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
924
   #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
964
   //===========================================================================
964
   //===========================================================================
965
 
965
 
966
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
966
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
967
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
968
-  #define UBL_MESH_NUM_Y_POINTS 10
967
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
968
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
969
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
969
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
970
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
970
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
971
   #define UBL_PROBE_PT_2_X 39
971
   #define UBL_PROBE_PT_2_X 39
981
   //===========================================================================
981
   //===========================================================================
982
 
982
 
983
   #define MESH_INSET 10          // Mesh inset margin on print area
983
   #define MESH_INSET 10          // Mesh inset margin on print area
984
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
985
-  #define MESH_NUM_Y_POINTS 3
984
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
985
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
986
 
986
 
987
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
987
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
988
 
988
 

+ 6
- 6
Marlin/example_configurations/makibox/Configuration.h 查看文件

816
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
816
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
817
 
817
 
818
   // Set the number of grid points per dimension.
818
   // Set the number of grid points per dimension.
819
-  #define ABL_GRID_MAX_POINTS_X 3
820
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
819
+  #define GRID_MAX_POINTS_X 3
820
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
821
 
821
 
822
   // Set the boundaries for probing (where the probe can reach).
822
   // Set the boundaries for probing (where the probe can reach).
823
   #define LEFT_PROBE_BED_POSITION 15
823
   #define LEFT_PROBE_BED_POSITION 15
863
   //===========================================================================
863
   //===========================================================================
864
 
864
 
865
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
865
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
866
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
867
-  #define UBL_MESH_NUM_Y_POINTS 10
866
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
867
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
868
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
868
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
869
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
869
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
870
   #define UBL_PROBE_PT_2_X 39
870
   #define UBL_PROBE_PT_2_X 39
880
   //===========================================================================
880
   //===========================================================================
881
 
881
 
882
   #define MESH_INSET 10          // Mesh inset margin on print area
882
   #define MESH_INSET 10          // Mesh inset margin on print area
883
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
884
-  #define MESH_NUM_Y_POINTS 3
883
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
884
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
885
 
885
 
886
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
886
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
887
 
887
 

+ 6
- 6
Marlin/example_configurations/tvrrug/Round2/Configuration.h 查看文件

809
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
809
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
810
 
810
 
811
   // Set the number of grid points per dimension.
811
   // Set the number of grid points per dimension.
812
-  #define ABL_GRID_MAX_POINTS_X 3
813
-  #define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
812
+  #define GRID_MAX_POINTS_X 3
813
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
814
 
814
 
815
   // Set the boundaries for probing (where the probe can reach).
815
   // Set the boundaries for probing (where the probe can reach).
816
   #define LEFT_PROBE_BED_POSITION 15
816
   #define LEFT_PROBE_BED_POSITION 15
856
   //===========================================================================
856
   //===========================================================================
857
 
857
 
858
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
858
   #define UBL_MESH_INSET 1          // Mesh inset margin on print area
859
-  #define UBL_MESH_NUM_X_POINTS 10  // Don't use more than 15 points per axis, implementation limited.
860
-  #define UBL_MESH_NUM_Y_POINTS 10
859
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
860
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
861
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
861
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
862
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
862
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
863
   #define UBL_PROBE_PT_2_X 39
863
   #define UBL_PROBE_PT_2_X 39
873
   //===========================================================================
873
   //===========================================================================
874
 
874
 
875
   #define MESH_INSET 10          // Mesh inset margin on print area
875
   #define MESH_INSET 10          // Mesh inset margin on print area
876
-  #define MESH_NUM_X_POINTS 3    // Don't use more than 7 points per axis, implementation limited.
877
-  #define MESH_NUM_Y_POINTS 3
876
+  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited.
877
+  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
878
 
878
 
879
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
879
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
880
 
880
 

+ 5
- 5
Marlin/mesh_bed_leveling.cpp 查看文件

29
   uint8_t mesh_bed_leveling::status;
29
   uint8_t mesh_bed_leveling::status;
30
 
30
 
31
   float mesh_bed_leveling::z_offset,
31
   float mesh_bed_leveling::z_offset,
32
-        mesh_bed_leveling::z_values[MESH_NUM_Y_POINTS][MESH_NUM_X_POINTS],
33
-        mesh_bed_leveling::index_to_xpos[MESH_NUM_X_POINTS],
34
-        mesh_bed_leveling::index_to_ypos[MESH_NUM_Y_POINTS];
32
+        mesh_bed_leveling::z_values[GRID_MAX_POINTS_Y][GRID_MAX_POINTS_X],
33
+        mesh_bed_leveling::index_to_xpos[GRID_MAX_POINTS_X],
34
+        mesh_bed_leveling::index_to_ypos[GRID_MAX_POINTS_Y];
35
 
35
 
36
   mesh_bed_leveling::mesh_bed_leveling() {
36
   mesh_bed_leveling::mesh_bed_leveling() {
37
-    for (uint8_t i = 0; i < MESH_NUM_X_POINTS; ++i)
37
+    for (uint8_t i = 0; i < GRID_MAX_POINTS_X; ++i)
38
       index_to_xpos[i] = MESH_MIN_X + i * (MESH_X_DIST);
38
       index_to_xpos[i] = MESH_MIN_X + i * (MESH_X_DIST);
39
-    for (uint8_t i = 0; i < MESH_NUM_Y_POINTS; ++i)
39
+    for (uint8_t i = 0; i < GRID_MAX_POINTS_Y; ++i)
40
       index_to_ypos[i] = MESH_MIN_Y + i * (MESH_Y_DIST);
40
       index_to_ypos[i] = MESH_MIN_Y + i * (MESH_Y_DIST);
41
     reset();
41
     reset();
42
   }
42
   }

+ 12
- 12
Marlin/mesh_bed_leveling.h 查看文件

40
     MBL_STATUS_REACTIVATE_BIT = 2
40
     MBL_STATUS_REACTIVATE_BIT = 2
41
   };
41
   };
42
 
42
 
43
-  #define MESH_X_DIST ((MESH_MAX_X - (MESH_MIN_X)) / (MESH_NUM_X_POINTS - 1))
44
-  #define MESH_Y_DIST ((MESH_MAX_Y - (MESH_MIN_Y)) / (MESH_NUM_Y_POINTS - 1))
43
+  #define MESH_X_DIST ((MESH_MAX_X - (MESH_MIN_X)) / (GRID_MAX_POINTS_X - 1))
44
+  #define MESH_Y_DIST ((MESH_MAX_Y - (MESH_MIN_Y)) / (GRID_MAX_POINTS_Y - 1))
45
 
45
 
46
   class mesh_bed_leveling {
46
   class mesh_bed_leveling {
47
   public:
47
   public:
48
     static uint8_t status; // Has Mesh and Is Active bits
48
     static uint8_t status; // Has Mesh and Is Active bits
49
     static float z_offset,
49
     static float z_offset,
50
-                 z_values[MESH_NUM_Y_POINTS][MESH_NUM_X_POINTS],
51
-                 index_to_xpos[MESH_NUM_X_POINTS],
52
-                 index_to_ypos[MESH_NUM_Y_POINTS];
50
+                 z_values[GRID_MAX_POINTS_Y][GRID_MAX_POINTS_X],
51
+                 index_to_xpos[GRID_MAX_POINTS_X],
52
+                 index_to_ypos[GRID_MAX_POINTS_Y];
53
 
53
 
54
     mesh_bed_leveling();
54
     mesh_bed_leveling();
55
 
55
 
65
     static void set_reactivate(const bool onOff) { onOff ? SBI(status, MBL_STATUS_REACTIVATE_BIT) : CBI(status, MBL_STATUS_REACTIVATE_BIT); }
65
     static void set_reactivate(const bool onOff) { onOff ? SBI(status, MBL_STATUS_REACTIVATE_BIT) : CBI(status, MBL_STATUS_REACTIVATE_BIT); }
66
 
66
 
67
     static inline void zigzag(const int8_t index, int8_t &px, int8_t &py) {
67
     static inline void zigzag(const int8_t index, int8_t &px, int8_t &py) {
68
-      px = index % (MESH_NUM_X_POINTS);
69
-      py = index / (MESH_NUM_X_POINTS);
70
-      if (py & 1) px = (MESH_NUM_X_POINTS - 1) - px; // Zig zag
68
+      px = index % (GRID_MAX_POINTS_X);
69
+      py = index / (GRID_MAX_POINTS_X);
70
+      if (py & 1) px = (GRID_MAX_POINTS_X - 1) - px; // Zig zag
71
     }
71
     }
72
 
72
 
73
     static void set_zigzag_z(const int8_t index, const float &z) {
73
     static void set_zigzag_z(const int8_t index, const float &z) {
78
 
78
 
79
     static int8_t cell_index_x(const float &x) {
79
     static int8_t cell_index_x(const float &x) {
80
       int8_t cx = (x - (MESH_MIN_X)) * (1.0 / (MESH_X_DIST));
80
       int8_t cx = (x - (MESH_MIN_X)) * (1.0 / (MESH_X_DIST));
81
-      return constrain(cx, 0, (MESH_NUM_X_POINTS) - 2);
81
+      return constrain(cx, 0, (GRID_MAX_POINTS_X) - 2);
82
     }
82
     }
83
 
83
 
84
     static int8_t cell_index_y(const float &y) {
84
     static int8_t cell_index_y(const float &y) {
85
       int8_t cy = (y - (MESH_MIN_Y)) * (1.0 / (MESH_Y_DIST));
85
       int8_t cy = (y - (MESH_MIN_Y)) * (1.0 / (MESH_Y_DIST));
86
-      return constrain(cy, 0, (MESH_NUM_Y_POINTS) - 2);
86
+      return constrain(cy, 0, (GRID_MAX_POINTS_Y) - 2);
87
     }
87
     }
88
 
88
 
89
     static int8_t probe_index_x(const float &x) {
89
     static int8_t probe_index_x(const float &x) {
90
       int8_t px = (x - (MESH_MIN_X) + 0.5 * (MESH_X_DIST)) * (1.0 / (MESH_X_DIST));
90
       int8_t px = (x - (MESH_MIN_X) + 0.5 * (MESH_X_DIST)) * (1.0 / (MESH_X_DIST));
91
-      return WITHIN(px, 0, MESH_NUM_X_POINTS - 1) ? px : -1;
91
+      return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
92
     }
92
     }
93
 
93
 
94
     static int8_t probe_index_y(const float &y) {
94
     static int8_t probe_index_y(const float &y) {
95
       int8_t py = (y - (MESH_MIN_Y) + 0.5 * (MESH_Y_DIST)) * (1.0 / (MESH_Y_DIST));
95
       int8_t py = (y - (MESH_MIN_Y) + 0.5 * (MESH_Y_DIST)) * (1.0 / (MESH_Y_DIST));
96
-      return WITHIN(py, 0, MESH_NUM_Y_POINTS - 1) ? py : -1;
96
+      return WITHIN(py, 0, GRID_MAX_POINTS_Y - 1) ? py : -1;
97
     }
97
     }
98
 
98
 
99
     static float calc_z0(const float &a0, const float &a1, const float &z1, const float &a2, const float &z2) {
99
     static float calc_z0(const float &a0, const float &a1, const float &z1, const float &a2, const float &z2) {

+ 3
- 3
Marlin/ultralcd.cpp 查看文件

1335
     // LCD probed points are from defaults
1335
     // LCD probed points are from defaults
1336
     constexpr uint8_t total_probe_points =
1336
     constexpr uint8_t total_probe_points =
1337
       #if ABL_GRID
1337
       #if ABL_GRID
1338
-        (ABL_GRID_MAX_POINTS_X) * (ABL_GRID_MAX_POINTS_Y)
1338
+        (GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y)
1339
       #elif ENABLED(AUTO_BED_LEVELING_3POINT)
1339
       #elif ENABLED(AUTO_BED_LEVELING_3POINT)
1340
         int(3)
1340
         int(3)
1341
       #elif ENABLED(AUTO_BED_LEVELING_UBL)
1341
       #elif ENABLED(AUTO_BED_LEVELING_UBL)
1342
-        (UBL_MESH_NUM_X_POINTS) * (UBL_MESH_NUM_Y_POINTS)
1342
+        (GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y)
1343
       #elif ENABLED(MESH_BED_LEVELING)
1343
       #elif ENABLED(MESH_BED_LEVELING)
1344
-        (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS)
1344
+        (GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y)
1345
       #endif
1345
       #endif
1346
     ;
1346
     ;
1347
 
1347
 

Loading…
取消
儲存