Sfoglia il codice sorgente

better documentation

Gabe Rosenhouse 11 anni fa
parent
commit
3b718b816c
2 ha cambiato i file con 44 aggiunte e 16 eliminazioni
  1. 37
    11
      Marlin/Configuration.h
  2. 7
    5
      Marlin/Marlin_main.cpp

+ 37
- 11
Marlin/Configuration.h Vedi File

@@ -335,21 +335,44 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
335 335
 
336 336
 #ifdef ENABLE_AUTO_BED_LEVELING
337 337
 
338
-// Enable auto bed leveling at any 3 points that aren't colinear
339
-#define AUTO_BED_LEVELING_ANY_POINTS
338
+// There are 3 different ways to pick the X and Y locations to probe:
339
+// 1. Basic 3-point probe at left-back, left-front, and right-front corners of a rectangle
340
+// 2. Probe all points of a 2D lattice, defined by a rectangle and ACCURATE_BED_LEVELING_POINTS
341
+// 3. 3-point probe at 3 arbitrary points that don't form a line.
340 342
 
341
-#ifdef AUTO_BED_LEVELING_ANY_POINTS
342
-  #define ABL_PROBE_PT_1_X -11
343
-  #define ABL_PROBE_PT_1_Y -15
344
-  #define ABL_PROBE_PT_2_X -11
345
-  #define ABL_PROBE_PT_2_Y 75
346
-  #define ABL_PROBE_PT_3_X 121
347
-  #define ABL_PROBE_PT_3_Y -15
343
+// To enable mode 1:
344
+//   - #define ENABLE_AUTO_BED_LEVELING
345
+//   - Set the XXXX_PROBE_BED_POSITION values below
346
+//   - Don't define AUTO_BED_LEVELING_ANY_POINTS or ACCURATE_BED_LEVELING
347
+
348
+// To enable mode 2:
349
+//  - #define ENABLE_AUTO_BED_LEVELING
350
+//  - Set the XXXX_PROBE_BED_POSITION values below
351
+//  - #define ACCURATE_BED_LEVELING
352
+//  - Set the ACCURATE_BED_LEVELING_POINTS to your desired density
353
+
354
+// To enable mode 3:
355
+//  - #define ENABLE_AUTO_BED_LEVELING
356
+//  - #define AUTO_BED_LEVELING_ANY_POINTS
357
+//  - Set the ABL_PROBE_PT_XXXX values below
358
+//  - Comment out (undefine) ACCURATE_BED_LEVELING since that is incompatible
348 359
 
349 360
 
361
+
362
+// Mode 3: Enable auto bed leveling at any 3 points that aren't colinear
363
+// #define AUTO_BED_LEVELING_ANY_POINTS
364
+#ifdef AUTO_BED_LEVELING_ANY_POINTS
365
+  #define ABL_PROBE_PT_1_X 15
366
+  #define ABL_PROBE_PT_1_Y 15
367
+  #define ABL_PROBE_PT_2_X 25
368
+  #define ABL_PROBE_PT_2_Y 75
369
+  #define ABL_PROBE_PT_3_X 125
370
+  #define ABL_PROBE_PT_3_Y 25
350 371
 #else // not AUTO_BED_LEVELING_ANY_POINTS
351 372
 
352
-  // these are the positions on the bed to do the probing
373
+  // Modes 1 & 2:
374
+  //   For mode 1, probing happens at left-back, left-front, and right-front corners
375
+  //   For mode 2, probing happens at lattice points within this rectangle (see ACCURATE_BED_LEVELING_POINTS)
353 376
   #define LEFT_PROBE_BED_POSITION 15
354 377
   #define RIGHT_PROBE_BED_POSITION 170
355 378
   #define BACK_PROBE_BED_POSITION 180
@@ -398,8 +421,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
398 421
   // with accurate bed leveling, the bed is sampled in a ACCURATE_BED_LEVELING_POINTSxACCURATE_BED_LEVELING_POINTS grid and least squares solution is calculated
399 422
   // Note: this feature occupies 10'206 byte
400 423
   #define ACCURATE_BED_LEVELING
401
-
424
+  // Mode 2 only
402 425
   #ifdef ACCURATE_BED_LEVELING
426
+    #ifdef AUTO_BED_LEVELING_ANY_POINTS
427
+      #error AUTO_BED_LEVELING_ANY_POINTS is incompatible with ACCURATE_BED_LEVELING
428
+    #endif
403 429
      // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
404 430
     #define ACCURATE_BED_LEVELING_POINTS 2
405 431
   #endif

+ 7
- 5
Marlin/Marlin_main.cpp Vedi File

@@ -1433,7 +1433,7 @@ void process_commands()
1433 1433
       break;
1434 1434
 
1435 1435
 #ifdef ENABLE_AUTO_BED_LEVELING
1436
-    case 29: // G29 Detailed Z-Probe, probes the bed at 3 points.
1436
+    case 29: // G29 Detailed Z-Probe, probes the bed at 3 or more points.
1437 1437
         {
1438 1438
             #if Z_MIN_PIN == -1
1439 1439
             #error "You must have a Z_MIN endstop in order to enable Auto Bed Leveling feature!!! Z_MIN_PIN must point to a valid hardware pin."
@@ -1463,6 +1463,7 @@ void process_commands()
1463 1463
 
1464 1464
             feedrate = homing_feedrate[Z_AXIS];
1465 1465
 #ifdef ACCURATE_BED_LEVELING
1466
+            // probe at the points of a lattice grid
1466 1467
 
1467 1468
             int xGridSpacing = (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION) / (ACCURATE_BED_LEVELING_POINTS-1);
1468 1469
             int yGridSpacing = (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION) / (ACCURATE_BED_LEVELING_POINTS-1);
@@ -1545,6 +1546,7 @@ void process_commands()
1545 1546
 
1546 1547
 
1547 1548
   #ifdef AUTO_BED_LEVELING_ANY_POINTS
1549
+            // Probe at 3 arbitrary points
1548 1550
             // probe 1
1549 1551
             float z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING);
1550 1552
 
@@ -1558,14 +1560,14 @@ void process_commands()
1558 1560
 
1559 1561
             set_bed_level_equation_any_pts(z_at_pt_1, z_at_pt_2, z_at_pt_3);
1560 1562
   #else // not AUTO_BED_LEVELING_ANY_POINTS
1561
-
1562
-            // prob 1
1563
+            // probe at 3 corners of a rectangle
1564
+            // probe 1
1563 1565
             float z_at_xLeft_yBack = probe_pt(LEFT_PROBE_BED_POSITION, BACK_PROBE_BED_POSITION, Z_RAISE_BEFORE_PROBING);
1564 1566
 
1565
-            // prob 2
1567
+            // probe 2
1566 1568
             float z_at_xLeft_yFront = probe_pt(LEFT_PROBE_BED_POSITION, FRONT_PROBE_BED_POSITION, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);
1567 1569
 
1568
-            // prob 3
1570
+            // probe 3
1569 1571
             float z_at_xRight_yFront = probe_pt(RIGHT_PROBE_BED_POSITION, FRONT_PROBE_BED_POSITION, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);
1570 1572
 
1571 1573
             clean_up_after_endstop_move();

Loading…
Annulla
Salva