Parcourir la source

Use same config name for all mesh dimensions

Scott Lahteine il y a 7 ans
Parent
révision
eb1e6aa29b
35 fichiers modifiés avec 318 ajouts et 314 suppressions
  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 Voir le fichier

@@ -813,8 +813,8 @@
813 813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
814 814
 
815 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 819
   // Set the boundaries for probing (where the probe can reach).
820 820
   #define LEFT_PROBE_BED_POSITION 15
@@ -860,8 +860,8 @@
860 860
   //===========================================================================
861 861
 
862 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 865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
866 866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
867 867
   #define UBL_PROBE_PT_2_X 39
@@ -877,8 +877,8 @@
877 877
   //===========================================================================
878 878
 
879 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 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 Voir le fichier

@@ -293,22 +293,22 @@
293 293
           end_angle   =  90.0;
294 294
           if (yi == 0)        // it is an edge, check for the two left corners
295 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 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 300
           start_angle =  90.0;
301 301
           end_angle   = 270.0;
302 302
           if (yi == 0)                  // it is an edge, check for the two right corners
303 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 305
             start_angle = 180.0;
306 306
         }
307 307
         else if (yi == 0) {
308 308
           start_angle =   0.0;         // only do the top   side of the cirlce
309 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 312
           start_angle = 180.0;         // only do the bottom side of the cirlce
313 313
           end_angle   = 360.0;
314 314
         }
@@ -397,8 +397,8 @@
397 397
 
398 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 402
         if (!is_bit_set(circle_flags, i, j)) {
403 403
           const float mx = ubl.mesh_index_to_xpos[i],  // We found a circle that needs to be printed
404 404
                       my = ubl.mesh_index_to_ypos[j];
@@ -432,10 +432,10 @@
432 432
   void look_for_lines_to_connect() {
433 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 439
                                          // This is already a half circle because we are at the edge of the bed.
440 440
 
441 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,7 +467,7 @@
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 471
                                            // This is already a half circle because we are at the edge  of the bed.
472 472
 
473 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 Voir le fichier

@@ -283,7 +283,7 @@ float code_value_temp_diff();
283 283
 
284 284
 #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
285 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 287
   float bilinear_z_offset(float logical[XYZ]);
288 288
   void set_bed_leveling_enabled(bool enable=true);
289 289
 #endif

+ 52
- 52
Marlin/Marlin_main.cpp Voir le fichier

@@ -589,7 +589,7 @@ static uint8_t target_extruder;
589 589
 
590 590
 #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
591 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 593
 #endif
594 594
 
595 595
 #if IS_SCARA
@@ -2341,8 +2341,8 @@ static void clean_up_after_endstop_or_probe_move() {
2341 2341
       #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
2342 2342
         bilinear_start[X_AXIS] = bilinear_start[Y_AXIS] =
2343 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 2346
             bed_level_grid[x][y] = NAN;
2347 2347
       #elif ENABLED(AUTO_BED_LEVELING_UBL)
2348 2348
         ubl.reset();
@@ -2473,9 +2473,9 @@ static void clean_up_after_endstop_or_probe_move() {
2473 2473
   //#define EXTRAPOLATE_FROM_EDGE
2474 2474
 
2475 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 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 2479
       #define HALF_IN_Y
2480 2480
     #endif
2481 2481
   #endif
@@ -2486,18 +2486,18 @@ static void clean_up_after_endstop_or_probe_move() {
2486 2486
    */
2487 2487
   static void extrapolate_unprobed_bed_level() {
2488 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 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 2493
                     xlen = ctrx1;
2494 2494
     #endif
2495 2495
 
2496 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 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 2501
                     ylen = ctry1;
2502 2502
     #endif
2503 2503
 
@@ -2524,17 +2524,17 @@ static void clean_up_after_endstop_or_probe_move() {
2524 2524
 
2525 2525
   static void print_bilinear_leveling_grid() {
2526 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 2528
       [](const uint8_t ix, const uint8_t iy) { return bed_level_grid[ix][iy]; }
2529 2529
     );
2530 2530
   }
2531 2531
 
2532 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 2538
     float bed_level_grid_virt[ABL_GRID_POINTS_VIRT_X][ABL_GRID_POINTS_VIRT_Y];
2539 2539
     int bilinear_grid_spacing_virt[2] = { 0 };
2540 2540
 
@@ -2550,8 +2550,8 @@ static void clean_up_after_endstop_or_probe_move() {
2550 2550
       uint8_t ep = 0, ip = 1;
2551 2551
       if (!x || x == ABL_TEMP_POINTS_X - 1) {
2552 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 2556
         if (WITHIN(y, 1, ABL_TEMP_POINTS_Y - 2))
2557 2557
           return LINEAR_EXTRAPOLATION(
@@ -2566,8 +2566,8 @@ static void clean_up_after_endstop_or_probe_move() {
2566 2566
       }
2567 2567
       if (!y || y == ABL_TEMP_POINTS_Y - 1) {
2568 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 2572
         if (WITHIN(x, 1, ABL_TEMP_POINTS_X - 2))
2573 2573
           return LINEAR_EXTRAPOLATION(
@@ -2604,11 +2604,11 @@ static void clean_up_after_endstop_or_probe_move() {
2604 2604
     }
2605 2605
 
2606 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 2609
           for (uint8_t ty = 0; ty < BILINEAR_SUBDIVISIONS; ty++)
2610 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 2612
                 continue;
2613 2613
               bed_level_grid_virt[x * (BILINEAR_SUBDIVISIONS) + tx][y * (BILINEAR_SUBDIVISIONS) + ty] =
2614 2614
                 bed_level_virt_2cmr(
@@ -3752,10 +3752,10 @@ inline void gcode_G28() {
3752 3752
   void say_not_entered() { SERIAL_PROTOCOLLNPGM(" not entered."); }
3753 3753
 
3754 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 3756
     SERIAL_PROTOCOLPGM("Z offset: "); SERIAL_PROTOCOL_F(mbl.z_offset, 5);
3757 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 3759
       [](const uint8_t ix, const uint8_t iy) { return mbl.z_values[ix][iy]; }
3760 3760
     );
3761 3761
   }
@@ -3832,7 +3832,7 @@ inline void gcode_G28() {
3832 3832
           #endif
3833 3833
         }
3834 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 3836
           mbl.zigzag(mbl_probe_index, px, py);
3837 3837
           _manual_goto_xy(mbl.index_to_xpos[px], mbl.index_to_ypos[py]);
3838 3838
 
@@ -3864,8 +3864,8 @@ inline void gcode_G28() {
3864 3864
       case MeshSet:
3865 3865
         if (code_seen('X')) {
3866 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 3869
             return;
3870 3870
           }
3871 3871
         }
@@ -3876,8 +3876,8 @@ inline void gcode_G28() {
3876 3876
 
3877 3877
         if (code_seen('Y')) {
3878 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 3881
             return;
3882 3882
           }
3883 3883
         }
@@ -4034,16 +4034,16 @@ inline void gcode_G28() {
4034 4034
       ABL_VAR int left_probe_bed_position, right_probe_bed_position, front_probe_bed_position, back_probe_bed_position;
4035 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 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 4042
         ABL_VAR int abl2;
4043 4043
         ABL_VAR bool do_topography_map;
4044 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 4048
         int constexpr abl2 = ABL_GRID_MAX;
4049 4049
       #endif
@@ -4054,7 +4054,7 @@ inline void gcode_G28() {
4054 4054
 
4055 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 4059
         ABL_VAR float eqnAMatrix[ABL_GRID_MAX * 3], // "A" matrix of the linear system of equations
4060 4060
                      eqnBVector[ABL_GRID_MAX],     // "B" vector of Z points
@@ -4105,10 +4105,10 @@ inline void gcode_G28() {
4105 4105
             // Get nearest i / j from x / y
4106 4106
             i = (x - LOGICAL_X_POSITION(bilinear_start[X_AXIS]) + 0.5 * xGridSpacing) / xGridSpacing;
4107 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 4112
             set_bed_leveling_enabled(false);
4113 4113
             bed_level_grid[i][j] = z;
4114 4114
             #if ENABLED(ABL_BILINEAR_SUBDIVISION)
@@ -4145,8 +4145,8 @@ inline void gcode_G28() {
4145 4145
 
4146 4146
         // X and Y specify points in each direction, overriding the default
4147 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 4150
         if (code_seen('P')) abl_grid_points_x = abl_grid_points_y = code_value_int();
4151 4151
 
4152 4152
         if (abl_grid_points_x < 2 || abl_grid_points_y < 2) {
@@ -7627,7 +7627,7 @@ void quickstop_stepper() {
7627 7627
       }
7628 7628
     }
7629 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 7631
         mbl.set_z(px, py, z);
7632 7632
       else {
7633 7633
         SERIAL_ERROR_START;
@@ -7656,7 +7656,7 @@ void quickstop_stepper() {
7656 7656
     if ((hasZ = code_seen('Z'))) z = code_value_axis_units(Z_AXIS);
7657 7657
 
7658 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 7660
         bed_level_grid[px][py] = z;
7661 7661
         #if ENABLED(ABL_BILINEAR_SUBDIVISION)
7662 7662
           bed_level_virt_interpolate();
@@ -7687,7 +7687,7 @@ void quickstop_stepper() {
7687 7687
     if ((hasZ = code_seen('Z'))) z = code_value_axis_units(Z_AXIS);
7688 7688
 
7689 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 7691
         ubl.z_values[px][py] = z;
7692 7692
       }
7693 7693
       else {
@@ -7801,8 +7801,8 @@ inline void gcode_M503() {
7801 7801
           // Correct bilinear grid for new probe offset
7802 7802
           const float diff = value - zprobe_zoffset;
7803 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 7806
                 bed_level_grid[x][y] += diff;
7807 7807
           }
7808 7808
           #if ENABLED(ABL_BILINEAR_SUBDIVISION)
@@ -9661,8 +9661,8 @@ void ok_to_send() {
9661 9661
     #define ABL_BG_GRID(X,Y)  bed_level_grid_virt[X][Y]
9662 9662
   #else
9663 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 9666
     #define ABL_BG_GRID(X,Y)  bed_level_grid[X][Y]
9667 9667
   #endif
9668 9668
 
@@ -9989,10 +9989,10 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
9989 9989
         cy1 = mbl.cell_index_y(RAW_CURRENT_POSITION(Y_AXIS)),
9990 9990
         cx2 = mbl.cell_index_x(RAW_X_POSITION(destination[X_AXIS])),
9991 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 9997
     if (cx1 == cx2 && cy1 == cy2) {
9998 9998
       // Start and end on same mesh square

+ 16
- 12
Marlin/SanityCheck.h Voir le fichier

@@ -147,9 +147,15 @@
147 147
 #elif defined(AUTO_BED_LEVELING_FEATURE)
148 148
   #error "AUTO_BED_LEVELING_FEATURE is deprecated. Specify AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_3POINT."
149 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 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 159
 #elif defined(UBL_MESH_EDIT_ENABLED)
154 160
   #error "UBL_MESH_EDIT_ENABLED is now UBL_G26_MESH_EDITING. Please update your configuration."
155 161
 #elif defined(BEEPER)
@@ -242,10 +248,10 @@
242 248
     #error "DELTA is incompatible with ENABLE_LEVELING_FADE_HEIGHT. Please disable it."
243 249
   #endif
244 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 255
     #endif
250 256
   #endif
251 257
 #endif
@@ -411,8 +417,8 @@ static_assert(1 >= 0
411 417
 #if ENABLED(MESH_BED_LEVELING)
412 418
   #if ENABLED(DELTA)
413 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 422
   #endif
417 423
 #endif
418 424
 
@@ -424,8 +430,6 @@ static_assert(1 >= 0
424 430
     #error "AUTO_BED_LEVELING_UBL does not yet support DELTA printers."
425 431
   #elif DISABLED(NEWPANEL)
426 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 433
   #endif
430 434
 #endif
431 435
 
@@ -602,8 +606,8 @@ static_assert(1 >= 0
602 606
   #elif ENABLED(AUTO_BED_LEVELING_UBL)
603 607
     #if DISABLED(EEPROM_SETTINGS)
604 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 611
     #elif !WITHIN(UBL_PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X)
608 612
       #error "The given UBL_PROBE_PT_1_X can't be reached by the Z probe."
609 613
     #elif !WITHIN(UBL_PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X)

+ 14
- 14
Marlin/UBL.h Voir le fichier

@@ -78,15 +78,15 @@
78 78
 
79 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 84
     typedef struct {
85 85
       bool active = false;
86 86
       float z_offset = 0.0;
87 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 91
       float mesh_x_min = UBL_MESH_MIN_X,
92 92
             mesh_y_min = UBL_MESH_MIN_Y,
@@ -122,9 +122,9 @@
122 122
 
123 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 129
         static bool g26_debug_flag,
130 130
                     has_control_of_lcd_panel;
@@ -151,14 +151,14 @@
151 151
 
152 152
         static int8_t get_cell_index_x(const float &x) {
153 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 155
         }                                                         // position. But with this defined this way, it is possible
156 156
                                                                   // to extrapolate off of this point even further out. Probably
157 157
                                                                   // that is OK because something else should be keeping that from
158 158
                                                                   // happening and should not be worried about at this level.
159 159
         static int8_t get_cell_index_y(const float &y) {
160 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 162
         }                                                         // position. But with this defined this way, it is possible
163 163
                                                                   // to extrapolate off of this point even further out. Probably
164 164
                                                                   // that is OK because something else should be keeping that from
@@ -166,12 +166,12 @@
166 166
 
167 167
         static int8_t find_closest_x_index(const float &x) {
168 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 172
         static int8_t find_closest_y_index(const float &y) {
173 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,7 +198,7 @@
198 198
          * the rare occasion when a point lies exactly on a Mesh line (denoted by index yi).
199 199
          */
200 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 202
             SERIAL_ECHOPAIR("? in z_correction_for_x_on_horizontal_mesh_line(lx0=", lx0);
203 203
             SERIAL_ECHOPAIR(",x1_i=", x1_i);
204 204
             SERIAL_ECHOPAIR(",yi=", yi);
@@ -217,7 +217,7 @@
217 217
         // See comments above for z_correction_for_x_on_horizontal_mesh_line
218 218
         //
219 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 221
             SERIAL_ECHOPAIR("? in get_z_correction_along_vertical_mesh_line_at_specific_x(ly0=", ly0);
222 222
             SERIAL_ECHOPAIR(", x1_i=", xi);
223 223
             SERIAL_ECHOPAIR(", yi=", y1_i);
@@ -242,7 +242,7 @@
242 242
           const int8_t cx = get_cell_index_x(RAW_X_POSITION(lx0)),
243 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 247
             SERIAL_ECHOPAIR("? in get_z_correction(lx0=", lx0);
248 248
             SERIAL_ECHOPAIR(", ly0=", ly0);

+ 16
- 16
Marlin/UBL_Bed_Leveling.cpp Voir le fichier

@@ -48,7 +48,7 @@
48 48
   }
49 49
 
50 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 52
       SERIAL_ECHOPGM("          ");
53 53
       #if TX_BUFFER_SIZE > 0
54 54
         MYSERIAL.flushTX();
@@ -59,10 +59,10 @@
59 59
 
60 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 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 67
   bool unified_bed_leveling::g26_debug_flag = false,
68 68
        unified_bed_leveling::has_control_of_lcd_panel = false;
@@ -165,8 +165,8 @@
165 165
   void unified_bed_leveling::invalidate() {
166 166
     state.active = false;
167 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 170
         z_values[x][y] = NAN;
171 171
   }
172 172
 
@@ -176,13 +176,13 @@
176 176
 
177 177
     if (map0) {
178 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 180
       SERIAL_ECHOPGM("    ");
181 181
     }
182 182
 
183 183
     if (map0) {
184 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 186
       SERIAL_EOL;
187 187
       serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MIN_Y);
188 188
       serial_echo_10x_spaces();
@@ -193,8 +193,8 @@
193 193
     const float current_xi = ubl.get_cell_index_x(current_position[X_AXIS] + (MESH_X_DIST) / 2.0),
194 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 198
         const bool is_current = i == current_xi && j == current_yi;
199 199
 
200 200
         // is the nozzle here? then mark the number
@@ -210,7 +210,7 @@
210 210
           SERIAL_PROTOCOL_F(f, 3);
211 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 215
         #if TX_BUFFER_SIZE > 0
216 216
           MYSERIAL.flushTX();
@@ -237,7 +237,7 @@
237 237
       serial_echo_xy(0, 0);
238 238
       SERIAL_ECHOPGM("       ");
239 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 241
       SERIAL_EOL;
242 242
     }
243 243
   }
@@ -245,12 +245,12 @@
245 245
   bool unified_bed_leveling::sanity_check() {
246 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 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 254
       error_flag++;
255 255
     }
256 256
     if (state.mesh_x_min != UBL_MESH_MIN_X) {

+ 31
- 31
Marlin/UBL_G29.cpp Voir le fichier

@@ -354,24 +354,24 @@
354 354
       SERIAL_PROTOCOLLNPGM("Loading test_pattern values.\n");
355 355
       switch (test_pattern) {
356 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 361
               ubl.z_values[x][y] += 2.0 * HYPOT(p1, p2);
362 362
             }
363 363
           }
364 364
           break;
365 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 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 370
           break;
371 371
         case 2:
372 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 375
               ubl.z_values[x][y] += code_seen('C') ? ubl_constant : 9.99;
376 376
           break;
377 377
       }
@@ -592,8 +592,8 @@
592 592
 
593 593
       if (storage_slot == -1) {                     // Special case, we are going to 'Export' the mesh to the
594 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 597
             if (!isnan(ubl.z_values[x][y])) {
598 598
               SERIAL_ECHOPAIR("M421 I ", x);
599 599
               SERIAL_ECHOPAIR(" J ", y);
@@ -694,8 +694,8 @@
694 694
 
695 695
     sum = sum_of_diff_squared = 0.0;
696 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 699
         if (!isnan(ubl.z_values[x][y])) {
700 700
           sum += ubl.z_values[x][y];
701 701
           n++;
@@ -706,8 +706,8 @@
706 706
     //
707 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 711
         if (!isnan(ubl.z_values[x][y])) {
712 712
           difference = (ubl.z_values[x][y] - mean);
713 713
           sum_of_diff_squared += difference * difference;
@@ -724,15 +724,15 @@
724 724
     SERIAL_EOL;
725 725
 
726 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 729
           if (!isnan(ubl.z_values[x][y]))
730 730
             ubl.z_values[x][y] -= mean + ubl_constant;
731 731
   }
732 732
 
733 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 736
         if (!isnan(ubl.z_values[x][y]))
737 737
           ubl.z_values[x][y] += ubl_constant;
738 738
   }
@@ -848,8 +848,8 @@
848 848
     SERIAL_ECHO_F(c, 6);
849 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 853
         c = -((normal.x * (UBL_MESH_MIN_X + i * (MESH_X_DIST)) + normal.y * (UBL_MESH_MIN_Y + j * (MESH_Y_DIST))) - d);
854 854
         ubl.z_values[i][j] += c;
855 855
       }
@@ -1148,7 +1148,7 @@
1148 1148
     safe_delay(50);
1149 1149
 
1150 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 1152
       SERIAL_PROTOCOL_F(LOGICAL_X_POSITION(ubl.mesh_index_to_xpos[i]), 1);
1153 1153
       SERIAL_PROTOCOLPGM("  ");
1154 1154
       safe_delay(50);
@@ -1156,7 +1156,7 @@
1156 1156
     SERIAL_EOL;
1157 1157
 
1158 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 1160
       SERIAL_PROTOCOL_F(LOGICAL_Y_POSITION(ubl.mesh_index_to_ypos[i]), 1);
1161 1161
       SERIAL_PROTOCOLPGM("  ");
1162 1162
       safe_delay(50);
@@ -1195,8 +1195,8 @@
1195 1195
 
1196 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 1200
     safe_delay(50);
1201 1201
     SERIAL_PROTOCOLPAIR("\nUBL_MESH_MIN_X         ", UBL_MESH_MIN_X);
1202 1202
     SERIAL_PROTOCOLPAIR("\nUBL_MESH_MIN_Y         ", UBL_MESH_MIN_Y);
@@ -1245,7 +1245,7 @@
1245 1245
    * use cases for the users. So we can wait and see what to do with it.
1246 1246
    */
1247 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 1250
     if (!code_has_value()) {
1251 1251
       SERIAL_PROTOCOLLNPGM("?Mesh # required.\n");
@@ -1267,8 +1267,8 @@
1267 1267
     SERIAL_PROTOCOLLNPAIR(" loaded from EEPROM address 0x", hex_word(j)); // Soon, we can remove the extra clutter of printing
1268 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 1272
         ubl.z_values[x][y] -= tmp_z_values[x][y];
1273 1273
   }
1274 1274
 
@@ -1285,8 +1285,8 @@
1285 1285
     const float px = lx - (probe_as_reference ? X_PROBE_OFFSET_FROM_EXTRUDER : 0),
1286 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 1291
         if ( (type == INVALID && isnan(ubl.z_values[i][j]))  // Check to see if this location holds the right thing
1292 1292
           || (type == REAL && !isnan(ubl.z_values[i][j]))
@@ -1314,8 +1314,8 @@
1314 1314
           distance = HYPOT(px - mx, py - my) + HYPOT(current_x - mx, current_y - my) * 0.1;
1315 1315
 
1316 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 1319
                 if (!isnan(ubl.z_values[k][l])) {                       // in the mesh. So we add in some of the distance to every probed
1320 1320
                   distance += sq(i - k) * (MESH_X_DIST) * .05       // point we can find.
1321 1321
                             + sq(j - l) * (MESH_Y_DIST) * .05;

+ 1
- 1
Marlin/UBL_line_to_destination.cpp Voir le fichier

@@ -135,7 +135,7 @@
135 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 140
         // Note: There is no Z Correction in this case. We are off the grid and don't know what
141 141
         // a reasonable correction would be.

+ 18
- 18
Marlin/configuration_store.cpp Voir le fichier

@@ -67,8 +67,8 @@
67 67
  * Mesh bed leveling:
68 68
  *  219  M420 S    from mbl.status (bool)
69 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 72
  *  226 G29 S3 XYZ z_values[][] (float x9, by default, up to float x 81) +288
73 73
  *
74 74
  * AUTO BED LEVELING
@@ -78,8 +78,8 @@
78 78
  *  266            planner.bed_level_matrix        (matrix_3x3 = float x9)
79 79
  *
80 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 83
  *  304            bilinear_grid_spacing           (int x2)   from G29: (B-F)/X, (R-L)/Y
84 84
  *  308  G29 L F   bilinear_start                  (int x2)
85 85
  *  312            bed_level_grid[][]              (float x9, up to float x256) +988
@@ -294,9 +294,9 @@ void Config_Postprocess() {
294 294
 
295 295
     #if ENABLED(MESH_BED_LEVELING)
296 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 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 300
       EEPROM_WRITE(leveling_is_on);
301 301
       EEPROM_WRITE(mbl.z_offset);
302 302
       EEPROM_WRITE(mesh_num_x);
@@ -336,8 +336,8 @@ void Config_Postprocess() {
336 336
 
337 337
     #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
338 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 341
       EEPROM_WRITE(grid_max_x);            // 1 byte
342 342
       EEPROM_WRITE(grid_max_y);            // 1 byte
343 343
       EEPROM_WRITE(bilinear_grid_spacing); // 2 ints
@@ -631,7 +631,7 @@ void Config_Postprocess() {
631 631
       #if ENABLED(MESH_BED_LEVELING)
632 632
         mbl.status = leveling_is_on ? _BV(MBL_STATUS_HAS_MESH_BIT) : 0;
633 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 635
           // EEPROM data fits the current mesh
636 636
           EEPROM_READ(mbl.z_values);
637 637
         }
@@ -668,7 +668,7 @@ void Config_Postprocess() {
668 668
       EEPROM_READ(grid_max_x);                       // 1 byte
669 669
       EEPROM_READ(grid_max_y);                       // 1 byte
670 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 672
           set_bed_leveling_enabled(false);
673 673
           EEPROM_READ(bilinear_grid_spacing);        // 2 ints
674 674
           EEPROM_READ(bilinear_start);               // 2 ints
@@ -1203,8 +1203,8 @@ void Config_ResetDefault() {
1203 1203
         CONFIG_ECHO_START;
1204 1204
       }
1205 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 1208
           CONFIG_ECHO_START;
1209 1209
           SERIAL_ECHOPAIR("  G29 S3 X", (int)px);
1210 1210
           SERIAL_ECHOPAIR(" Y", (int)py);
@@ -1235,14 +1235,14 @@ void Config_ResetDefault() {
1235 1235
         SERIAL_ECHOPAIR("EEPROM can hold ", (int)((UBL_LAST_EEPROM_INDEX - ubl.eeprom_start) / sizeof(ubl.z_values)));
1236 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 1247
         SERIAL_ECHOLNPGM("MESH_X_DIST        " STRINGIFY(MESH_X_DIST));
1248 1248
         SERIAL_ECHOLNPGM("MESH_Y_DIST        " STRINGIFY(MESH_Y_DIST));

+ 6
- 6
Marlin/example_configurations/Cartesio/Configuration.h Voir le fichier

@@ -813,8 +813,8 @@
813 813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
814 814
 
815 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 819
   // Set the boundaries for probing (where the probe can reach).
820 820
   #define LEFT_PROBE_BED_POSITION 15
@@ -860,8 +860,8 @@
860 860
   //===========================================================================
861 861
 
862 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 865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
866 866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
867 867
   #define UBL_PROBE_PT_2_X 39
@@ -877,8 +877,8 @@
877 877
   //===========================================================================
878 878
 
879 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 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 Voir le fichier

@@ -796,8 +796,8 @@
796 796
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
797 797
 
798 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 802
   // Set the boundaries for probing (where the probe can reach).
803 803
   #define LEFT_PROBE_BED_POSITION 15
@@ -843,8 +843,8 @@
843 843
   //===========================================================================
844 844
 
845 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 848
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
849 849
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
850 850
   #define UBL_PROBE_PT_2_X 39
@@ -860,8 +860,8 @@
860 860
   //===========================================================================
861 861
 
862 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 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 Voir le fichier

@@ -796,8 +796,8 @@
796 796
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
797 797
 
798 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 802
   // Set the boundaries for probing (where the probe can reach).
803 803
   #define LEFT_PROBE_BED_POSITION 15
@@ -843,8 +843,8 @@
843 843
   //===========================================================================
844 844
 
845 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 848
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
849 849
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
850 850
   #define UBL_PROBE_PT_2_X 39
@@ -860,8 +860,8 @@
860 860
   //===========================================================================
861 861
 
862 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 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 Voir le fichier

@@ -805,8 +805,8 @@
805 805
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
806 806
 
807 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 811
   // Set the boundaries for probing (where the probe can reach).
812 812
   #define LEFT_PROBE_BED_POSITION 15
@@ -852,8 +852,8 @@
852 852
   //===========================================================================
853 853
 
854 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 857
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
858 858
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
859 859
   #define UBL_PROBE_PT_2_X 39
@@ -869,8 +869,8 @@
869 869
   //===========================================================================
870 870
 
871 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 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 Voir le fichier

@@ -807,8 +807,8 @@
807 807
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
808 808
 
809 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 813
   // Set the boundaries for probing (where the probe can reach).
814 814
   #define LEFT_PROBE_BED_POSITION  X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER
@@ -854,8 +854,8 @@
854 854
   //===========================================================================
855 855
 
856 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 859
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
860 860
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
861 861
   #define UBL_PROBE_PT_2_X 39
@@ -871,8 +871,8 @@
871 871
   //===========================================================================
872 872
 
873 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 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 Voir le fichier

@@ -842,8 +842,8 @@
842 842
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
843 843
 
844 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 848
   // Set the boundaries for probing (where the probe can reach).
849 849
   #define LEFT_PROBE_BED_POSITION 15
@@ -889,8 +889,8 @@
889 889
   //===========================================================================
890 890
 
891 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 894
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
895 895
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
896 896
   #define UBL_PROBE_PT_2_X 39
@@ -906,8 +906,8 @@
906 906
   //===========================================================================
907 907
 
908 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 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 Voir le fichier

@@ -813,8 +813,8 @@
813 813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
814 814
 
815 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 819
   // Set the boundaries for probing (where the probe can reach).
820 820
   #define LEFT_PROBE_BED_POSITION 15
@@ -860,8 +860,8 @@
860 860
   //===========================================================================
861 861
 
862 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 865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
866 866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
867 867
   #define UBL_PROBE_PT_2_X 39
@@ -877,8 +877,8 @@
877 877
   //===========================================================================
878 878
 
879 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 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 Voir le fichier

@@ -813,8 +813,8 @@
813 813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
814 814
 
815 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 819
   // Set the boundaries for probing (where the probe can reach).
820 820
   #define LEFT_PROBE_BED_POSITION 15
@@ -860,8 +860,8 @@
860 860
   //===========================================================================
861 861
 
862 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 865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
866 866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
867 867
   #define UBL_PROBE_PT_2_X 39
@@ -877,8 +877,8 @@
877 877
   //===========================================================================
878 878
 
879 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 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 Voir le fichier

@@ -813,8 +813,8 @@
813 813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
814 814
 
815 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 819
   // Set the boundaries for probing (where the probe can reach).
820 820
   #define LEFT_PROBE_BED_POSITION 15
@@ -860,8 +860,8 @@
860 860
   //===========================================================================
861 861
 
862 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 865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
866 866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
867 867
   #define UBL_PROBE_PT_2_X 39
@@ -877,8 +877,8 @@
877 877
   //===========================================================================
878 878
 
879 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 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 Voir le fichier

@@ -812,8 +812,8 @@
812 812
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
813 813
 
814 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 818
   // Set the boundaries for probing (where the probe can reach).
819 819
   #define LEFT_PROBE_BED_POSITION 15
@@ -859,8 +859,8 @@
859 859
   //===========================================================================
860 860
 
861 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 864
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
865 865
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
866 866
   #define UBL_PROBE_PT_2_X 39
@@ -876,8 +876,8 @@
876 876
   //===========================================================================
877 877
 
878 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 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 Voir le fichier

@@ -828,8 +828,8 @@
828 828
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
829 829
 
830 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 834
   // Set the boundaries for probing (where the probe can reach).
835 835
   #define LEFT_PROBE_BED_POSITION 15
@@ -875,8 +875,8 @@
875 875
   //===========================================================================
876 876
 
877 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 880
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
881 881
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
882 882
   #define UBL_PROBE_PT_2_X 39
@@ -892,8 +892,8 @@
892 892
   //===========================================================================
893 893
 
894 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 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 Voir le fichier

@@ -834,8 +834,8 @@
834 834
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
835 835
 
836 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 840
   // Set the boundaries for probing (where the probe can reach).
841 841
   #define LEFT_PROBE_BED_POSITION 15
@@ -881,8 +881,8 @@
881 881
   //===========================================================================
882 882
 
883 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 886
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
887 887
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
888 888
   #define UBL_PROBE_PT_2_X 39
@@ -898,8 +898,8 @@
898 898
   //===========================================================================
899 899
 
900 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 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 Voir le fichier

@@ -864,8 +864,8 @@
864 864
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
865 865
 
866 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 870
   // Set the boundaries for probing (where the probe can reach).
871 871
   #define LEFT_PROBE_BED_POSITION 15
@@ -911,8 +911,8 @@
911 911
   //===========================================================================
912 912
 
913 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 916
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
917 917
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
918 918
   #define UBL_PROBE_PT_2_X 39
@@ -928,8 +928,8 @@
928 928
   //===========================================================================
929 929
 
930 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 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 Voir le fichier

@@ -805,8 +805,8 @@
805 805
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
806 806
 
807 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 811
   // Set the boundaries for probing (where the probe can reach).
812 812
   #define LEFT_PROBE_BED_POSITION 15
@@ -852,8 +852,8 @@
852 852
   //===========================================================================
853 853
 
854 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 857
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
858 858
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
859 859
   #define UBL_PROBE_PT_2_X 39
@@ -869,8 +869,8 @@
869 869
   //===========================================================================
870 870
 
871 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 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 Voir le fichier

@@ -813,8 +813,8 @@
813 813
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
814 814
 
815 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 819
   // Set the boundaries for probing (where the probe can reach).
820 820
   #define LEFT_PROBE_BED_POSITION 15
@@ -860,8 +860,8 @@
860 860
   //===========================================================================
861 861
 
862 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 865
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
866 866
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
867 867
   #define UBL_PROBE_PT_2_X 39
@@ -877,8 +877,8 @@
877 877
   //===========================================================================
878 878
 
879 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 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 Voir le fichier

@@ -919,8 +919,8 @@
919 919
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
920 920
 
921 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 925
   // Set the boundaries for probing (where the probe can reach).
926 926
   #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 15)
@@ -966,8 +966,8 @@
966 966
   //===========================================================================
967 967
 
968 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 971
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
972 972
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
973 973
   #define UBL_PROBE_PT_2_X 39
@@ -983,8 +983,8 @@
983 983
   //===========================================================================
984 984
 
985 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 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 Voir le fichier

@@ -904,8 +904,8 @@
904 904
 
905 905
   // Set the number of grid points per dimension.
906 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 910
   // Set the boundaries for probing (where the probe can reach).
911 911
   #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
@@ -951,8 +951,8 @@
951 951
   //===========================================================================
952 952
 
953 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 956
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
957 957
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
958 958
   #define UBL_PROBE_PT_2_X 39
@@ -968,8 +968,8 @@
968 968
   //===========================================================================
969 969
 
970 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 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 Voir le fichier

@@ -907,8 +907,8 @@
907 907
 
908 908
   // Set the number of grid points per dimension.
909 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 913
   // Set the boundaries for probing (where the probe can reach).
914 914
   #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
@@ -955,8 +955,8 @@
955 955
   //===========================================================================
956 956
 
957 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 960
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
961 961
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
962 962
   #define UBL_PROBE_PT_2_X 39
@@ -972,8 +972,8 @@
972 972
   //===========================================================================
973 973
 
974 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 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 Voir le fichier

@@ -906,11 +906,11 @@
906 906
 
907 907
   // Set the number of grid points per dimension.
908 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 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 914
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
915 915
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
916 916
   #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
@@ -954,8 +954,8 @@
954 954
   //===========================================================================
955 955
 
956 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 959
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
960 960
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
961 961
   #define UBL_PROBE_PT_2_X 39
@@ -971,8 +971,8 @@
971 971
   //===========================================================================
972 972
 
973 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 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 Voir le fichier

@@ -917,8 +917,8 @@
917 917
 
918 918
   // Set the number of grid points per dimension.
919 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 923
   // Set the boundaries for probing (where the probe can reach).
924 924
   #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
@@ -964,8 +964,8 @@
964 964
   //===========================================================================
965 965
 
966 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 969
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
970 970
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
971 971
   #define UBL_PROBE_PT_2_X 39
@@ -981,8 +981,8 @@
981 981
   //===========================================================================
982 982
 
983 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 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 Voir le fichier

@@ -816,8 +816,8 @@
816 816
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
817 817
 
818 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 822
   // Set the boundaries for probing (where the probe can reach).
823 823
   #define LEFT_PROBE_BED_POSITION 15
@@ -863,8 +863,8 @@
863 863
   //===========================================================================
864 864
 
865 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 868
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
869 869
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
870 870
   #define UBL_PROBE_PT_2_X 39
@@ -880,8 +880,8 @@
880 880
   //===========================================================================
881 881
 
882 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 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 Voir le fichier

@@ -809,8 +809,8 @@
809 809
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
810 810
 
811 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 815
   // Set the boundaries for probing (where the probe can reach).
816 816
   #define LEFT_PROBE_BED_POSITION 15
@@ -856,8 +856,8 @@
856 856
   //===========================================================================
857 857
 
858 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 861
   #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
862 862
   #define UBL_PROBE_PT_1_Y 180      // of the mesh.
863 863
   #define UBL_PROBE_PT_2_X 39
@@ -873,8 +873,8 @@
873 873
   //===========================================================================
874 874
 
875 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 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 Voir le fichier

@@ -29,14 +29,14 @@
29 29
   uint8_t mesh_bed_leveling::status;
30 30
 
31 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 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 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 40
       index_to_ypos[i] = MESH_MIN_Y + i * (MESH_Y_DIST);
41 41
     reset();
42 42
   }

+ 12
- 12
Marlin/mesh_bed_leveling.h Voir le fichier

@@ -40,16 +40,16 @@
40 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 46
   class mesh_bed_leveling {
47 47
   public:
48 48
     static uint8_t status; // Has Mesh and Is Active bits
49 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 54
     mesh_bed_leveling();
55 55
 
@@ -65,9 +65,9 @@
65 65
     static void set_reactivate(const bool onOff) { onOff ? SBI(status, MBL_STATUS_REACTIVATE_BIT) : CBI(status, MBL_STATUS_REACTIVATE_BIT); }
66 66
 
67 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 73
     static void set_zigzag_z(const int8_t index, const float &z) {
@@ -78,22 +78,22 @@
78 78
 
79 79
     static int8_t cell_index_x(const float &x) {
80 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 84
     static int8_t cell_index_y(const float &y) {
85 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 89
     static int8_t probe_index_x(const float &x) {
90 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 94
     static int8_t probe_index_y(const float &y) {
95 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 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 Voir le fichier

@@ -1335,13 +1335,13 @@ void kill_screen(const char* lcd_msg) {
1335 1335
     // LCD probed points are from defaults
1336 1336
     constexpr uint8_t total_probe_points =
1337 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 1339
       #elif ENABLED(AUTO_BED_LEVELING_3POINT)
1340 1340
         int(3)
1341 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 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 1345
       #endif
1346 1346
     ;
1347 1347
 

Chargement…
Annuler
Enregistrer