Browse Source

Merge pull request #6050 from thinkyhead/rc_probe_manually

Add PROBE_MANUALLY — ABL without a probe
Scott Lahteine 8 years ago
parent
commit
f75aa4d5be
29 changed files with 1139 additions and 539 deletions
  1. 10
    11
      .travis.yml
  2. 2
    2
      Marlin/Conditionals_LCD.h
  3. 1
    1
      Marlin/Conditionals_post.h
  4. 18
    9
      Marlin/Configuration.h
  5. 525
    202
      Marlin/Marlin_main.cpp
  6. 9
    7
      Marlin/SanityCheck.h
  7. 0
    10
      Marlin/enum.h
  8. 19
    11
      Marlin/example_configurations/Cartesio/Configuration.h
  9. 19
    11
      Marlin/example_configurations/Felix/Configuration.h
  10. 19
    11
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  11. 19
    11
      Marlin/example_configurations/Hephestos/Configuration.h
  12. 19
    11
      Marlin/example_configurations/Hephestos_2/Configuration.h
  13. 19
    11
      Marlin/example_configurations/K8200/Configuration.h
  14. 19
    11
      Marlin/example_configurations/K8400/Configuration.h
  15. 19
    11
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  16. 19
    11
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  17. 19
    11
      Marlin/example_configurations/RigidBot/Configuration.h
  18. 19
    11
      Marlin/example_configurations/SCARA/Configuration.h
  19. 19
    11
      Marlin/example_configurations/TAZ4/Configuration.h
  20. 19
    11
      Marlin/example_configurations/WITBOX/Configuration.h
  21. 19
    11
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  22. 19
    10
      Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h
  23. 19
    11
      Marlin/example_configurations/delta/generic/Configuration.h
  24. 19
    11
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  25. 19
    11
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  26. 19
    11
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  27. 19
    11
      Marlin/example_configurations/makibox/Configuration.h
  28. 19
    11
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  29. 175
    67
      Marlin/ultralcd.cpp

+ 10
- 11
.travis.yml View File

@@ -124,24 +124,17 @@ script:
124 124
   - build_marlin
125 125
   #
126 126
   # Test a Sled Z Probe
127
-  #
128
-  - restore_configs
129
-  - opt_enable Z_PROBE_SLED
130
-  - build_marlin
131
-  #
132 127
   # ...with AUTO_BED_LEVELING_LINEAR, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, and EEPROM_CHITCHAT
133 128
   #
134
-  - opt_enable AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
129
+  - restore_configs
130
+  - opt_enable Z_PROBE_SLED AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
135 131
   - build_marlin
136 132
   #
137 133
   # Test a Servo Probe
134
+  # ...with AUTO_BED_LEVELING_3POINT, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, EEPROM_CHITCHAT, EXTENDED_CAPABILITIES_REPORT, and AUTO_REPORT_TEMPERATURES
138 135
   #
139 136
   - restore_configs
140 137
   - opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
141
-  - build_marlin
142
-  #
143
-  # ...with AUTO_BED_LEVELING_3POINT, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, EEPROM_CHITCHAT, EXTENDED_CAPABILITIES_REPORT, and AUTO_REPORT_TEMPERATURES
144
-  #
145 138
   - opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
146 139
   - opt_enable_adv EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES
147 140
   - build_marlin
@@ -149,7 +142,13 @@ script:
149 142
   # Test MESH_BED_LEVELING feature, with LCD
150 143
   #
151 144
   - restore_configs
152
-  - opt_enable MESH_BED_LEVELING MESH_G28_REST_ORIGIN MANUAL_BED_LEVELING ULTIMAKERCONTROLLER
145
+  - opt_enable MESH_BED_LEVELING MESH_G28_REST_ORIGIN LCD_BED_LEVELING ULTIMAKERCONTROLLER
146
+  - build_marlin
147
+  #
148
+  # Test PROBE_MANUALLY feature, with LCD support
149
+  #
150
+  - restore_configs
151
+  - opt_enable PROBE_MANUALLY AUTO_BED_LEVELING_BILINEAR LCD_BED_LEVELING ULTIMAKERCONTROLLER
153 152
   - build_marlin
154 153
   #
155 154
   # Test EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER,

+ 2
- 2
Marlin/Conditionals_LCD.h View File

@@ -371,12 +371,12 @@
371 371
   /**
372 372
    * Set a flag for any enabled probe
373 373
    */
374
-  #define PROBE_SELECTED (ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))
374
+  #define PROBE_SELECTED (ENABLED(PROBE_MANUALLY) || ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))
375 375
 
376 376
   /**
377 377
    * Clear probe pin settings when no probe is selected
378 378
    */
379
-  #if !PROBE_SELECTED
379
+  #if !PROBE_SELECTED || ENABLED(PROBE_MANUALLY)
380 380
     #undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
381 381
     #undef Z_MIN_PROBE_ENDSTOP
382 382
   #endif

+ 1
- 1
Marlin/Conditionals_post.h View File

@@ -589,7 +589,7 @@
589 589
 
590 590
   #define PROBE_PIN_CONFIGURED (HAS_Z_MIN_PROBE_PIN || (HAS_Z_MIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)))
591 591
 
592
-  #define HAS_BED_PROBE (PROBE_SELECTED && PROBE_PIN_CONFIGURED)
592
+  #define HAS_BED_PROBE (PROBE_SELECTED && PROBE_PIN_CONFIGURED && DISABLED(PROBE_MANUALLY))
593 593
 
594 594
   #if ENABLED(Z_PROBE_ALLEN_KEY)
595 595
     #define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST

+ 18
- 9
Marlin/Configuration.h View File

@@ -545,6 +545,11 @@
545 545
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
546 546
 //
547 547
 
548
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
549
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
550
+// or (with LCD_BED_LEVELING) the LCD controller.
551
+//#define PROBE_MANUALLY
552
+
548 553
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
549 554
 // For example an inductive probe, or a setup that uses the nozzle to probe.
550 555
 // An inductive probe must be deactivated to go below
@@ -876,14 +881,18 @@
876 881
 
877 882
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
878 883
 
879
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
880
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
884
+#endif // BED_LEVELING
881 885
 
882
-  #if ENABLED(MANUAL_BED_LEVELING)
883
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
884
-  #endif
886
+/**
887
+ * Use the LCD controller for bed leveling
888
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
889
+ */
890
+//#define LCD_BED_LEVELING
885 891
 
886
-#endif // BED_LEVELING
892
+#if ENABLED(LCD_BED_LEVELING)
893
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
894
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
895
+#endif
887 896
 
888 897
 /**
889 898
  * Commands to execute at the end of G29 probing.
@@ -1432,13 +1441,13 @@
1432 1441
 
1433 1442
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1434 1443
 // be used to mitigate the associated resolution loss. If enabled,
1435
-// some of the PWM cycles are stretched so on average the wanted
1444
+// some of the PWM cycles are stretched so on average the desired
1436 1445
 // duty cycle is attained.
1437 1446
 //#define SOFT_PWM_DITHER
1438 1447
 
1439 1448
 // Temperature status LEDs that display the hotend and bed temperature.
1440
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1441
-// Otherwise the RED led is on. There is 1C hysteresis.
1449
+// If all hotends, bed temperature, and target temperature are under 54C
1450
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1442 1451
 //#define TEMP_STAT_LEDS
1443 1452
 
1444 1453
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 525
- 202
Marlin/Marlin_main.cpp View File

@@ -353,10 +353,10 @@ static long gcode_N, gcode_LastN, Stopped_gcode_LastN = 0;
353 353
  * the main loop. The process_next_command function parses the next
354 354
  * command and hands off execution to individual handler functions.
355 355
  */
356
-static char command_queue[BUFSIZE][MAX_CMD_SIZE];
356
+uint8_t commands_in_queue = 0; // Count of commands in the queue
357 357
 static uint8_t cmd_queue_index_r = 0, // Ring buffer read position
358
-               cmd_queue_index_w = 0, // Ring buffer write position
359
-               commands_in_queue = 0; // Count of commands in the queue
358
+               cmd_queue_index_w = 0; // Ring buffer write position
359
+static char command_queue[BUFSIZE][MAX_CMD_SIZE];
360 360
 
361 361
 /**
362 362
  * Current GCode Command
@@ -3502,6 +3502,12 @@ inline void gcode_G4() {
3502 3502
 
3503 3503
 #endif // Z_SAFE_HOMING
3504 3504
 
3505
+#if ENABLED(PROBE_MANUALLY)
3506
+  bool g29_in_progress = false;
3507
+#else
3508
+  constexpr bool g29_in_progress = false;
3509
+#endif
3510
+
3505 3511
 /**
3506 3512
  * G28: Home all axes according to settings
3507 3513
  *
@@ -3529,6 +3535,11 @@ inline void gcode_G28() {
3529 3535
   // Wait for planner moves to finish!
3530 3536
   stepper.synchronize();
3531 3537
 
3538
+  // Cancel the active G29 session
3539
+  #if ENABLED(PROBE_MANUALLY)
3540
+    g29_in_progress = false;
3541
+  #endif
3542
+
3532 3543
   // Disable the leveling matrix before homing
3533 3544
   #if PLANNER_LEVELING
3534 3545
     #if ENABLED(AUTO_BED_LEVELING_UBL)
@@ -3719,9 +3730,9 @@ inline void gcode_G28() {
3719 3730
 
3720 3731
 #endif
3721 3732
 
3722
-#if ENABLED(MESH_BED_LEVELING)
3733
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(PROBE_MANUALLY)
3723 3734
 
3724
-  inline void _mbl_goto_xy(const float &x, const float &y) {
3735
+  inline void _manual_goto_xy(const float &x, const float &y) {
3725 3736
     const float old_feedrate_mm_s = feedrate_mm_s;
3726 3737
 
3727 3738
     #if MANUAL_PROBE_HEIGHT > 0
@@ -3745,6 +3756,10 @@ inline void gcode_G28() {
3745 3756
     stepper.synchronize();
3746 3757
   }
3747 3758
 
3759
+#endif
3760
+
3761
+#if ENABLED(MESH_BED_LEVELING)
3762
+
3748 3763
   // Save 130 bytes with non-duplication of PSTR
3749 3764
   void say_not_entered() { SERIAL_PROTOCOLLNPGM(" not entered."); }
3750 3765
 
@@ -3835,7 +3850,7 @@ inline void gcode_G28() {
3835 3850
         // If there's another point to sample, move there with optional lift.
3836 3851
         if (mbl_probe_index < (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS)) {
3837 3852
           mbl.zigzag(mbl_probe_index, px, py);
3838
-          _mbl_goto_xy(mbl.index_to_xpos[px], mbl.index_to_ypos[py]);
3853
+          _manual_goto_xy(mbl.index_to_xpos[px], mbl.index_to_ypos[py]);
3839 3854
 
3840 3855
           #if HAS_SOFTWARE_ENDSTOPS
3841 3856
             // Disable software endstops to allow manual adjustment
@@ -3917,50 +3932,86 @@ inline void gcode_G28() {
3917 3932
 
3918 3933
 #elif HAS_ABL && DISABLED(AUTO_BED_LEVELING_UBL)
3919 3934
 
3935
+  #if ABL_GRID
3936
+    #if ENABLED(PROBE_Y_FIRST)
3937
+      #define PR_OUTER_VAR xCount
3938
+      #define PR_OUTER_END abl_grid_points_x
3939
+      #define PR_INNER_VAR yCount
3940
+      #define PR_INNER_END abl_grid_points_y
3941
+    #else
3942
+      #define PR_OUTER_VAR yCount
3943
+      #define PR_OUTER_END abl_grid_points_y
3944
+      #define PR_INNER_VAR xCount
3945
+      #define PR_INNER_END abl_grid_points_x
3946
+    #endif
3947
+  #endif
3948
+
3920 3949
   /**
3921 3950
    * G29: Detailed Z probe, probes the bed at 3 or more points.
3922 3951
    *      Will fail if the printer has not been homed with G28.
3923 3952
    *
3924 3953
    * Enhanced G29 Auto Bed Leveling Probe Routine
3925 3954
    *
3926
-   * Parameters With LINEAR and BILINEAR:
3955
+   *  D  Dry-Run mode. Just evaluate the bed Topology - Don't apply
3956
+   *     or alter the bed level data. Useful to check the topology
3957
+   *     after a first run of G29.
3958
+   *
3959
+   *  J  Jettison current bed leveling data
3960
+   *
3961
+   *  V  Set the verbose level (0-4). Example: "G29 V3"
3962
+   *
3963
+   * Parameters With LINEAR leveling only:
3927 3964
    *
3928 3965
    *  P  Set the size of the grid that will be probed (P x P points).
3929
-   *     Not supported by non-linear delta printer bed leveling.
3930 3966
    *     Example: "G29 P4"
3931 3967
    *
3932
-   *  S  Set the XY travel speed between probe points (in units/min)
3968
+   *  X  Set the X size of the grid that will be probed (X x Y points).
3969
+   *     Example: "G29 X7 Y5"
3933 3970
    *
3934
-   *  D  Dry-Run mode. Just evaluate the bed Topology - Don't apply
3935
-   *     or clean the rotation Matrix. Useful to check the topology
3936
-   *     after a first run of G29.
3937
-   *
3938
-   *  V  Set the verbose level (0-4). Example: "G29 V3"
3971
+   *  Y  Set the Y size of the grid that will be probed (X x Y points).
3939 3972
    *
3940 3973
    *  T  Generate a Bed Topology Report. Example: "G29 P5 T" for a detailed report.
3941 3974
    *     This is useful for manual bed leveling and finding flaws in the bed (to
3942 3975
    *     assist with part placement).
3943 3976
    *     Not supported by non-linear delta printer bed leveling.
3944 3977
    *
3978
+   * Parameters With LINEAR and BILINEAR leveling only:
3979
+   *
3980
+   *  S  Set the XY travel speed between probe points (in units/min)
3981
+   *
3945 3982
    *  F  Set the Front limit of the probing grid
3946 3983
    *  B  Set the Back limit of the probing grid
3947 3984
    *  L  Set the Left limit of the probing grid
3948 3985
    *  R  Set the Right limit of the probing grid
3949 3986
    *
3950
-   * Parameters with BILINEAR only:
3987
+   * Parameters with BILINEAR leveling only:
3951 3988
    *
3952 3989
    *  Z  Supply an additional Z probe offset
3953 3990
    *
3954
-   * Global Parameters:
3991
+   * Extra parameters with PROBE_MANUALLY:
3992
+   *
3993
+   *  To do manual probing simply repeat G29 until the procedure is complete.
3994
+   *  The first G29 accepts parameters. 'G29 Q' for status, 'G29 A' to abort.
3995
+   *
3996
+   *  Q  Query leveling and G29 state
3997
+   *
3998
+   *  A  Abort current leveling procedure
3999
+   *
4000
+   *  W  Write a mesh point. (Ignored during leveling.)
4001
+   *  X  Required X for mesh point
4002
+   *  Y  Required Y for mesh point
4003
+   *  Z  Required Z for mesh point
3955 4004
    *
3956
-   * E/e By default G29 will engage the Z probe, test the bed, then disengage.
4005
+   * Without PROBE_MANUALLY:
4006
+   *
4007
+   *  E  By default G29 will engage the Z probe, test the bed, then disengage.
3957 4008
    *     Include "E" to engage/disengage the Z probe for each sample.
3958 4009
    *     There's no extra effect if you have a fixed Z probe.
3959
-   *     Usage: "G29 E" or "G29 e"
3960 4010
    *
3961 4011
    */
3962 4012
   inline void gcode_G29() {
3963 4013
 
4014
+    // G29 Q is also available if debugging
3964 4015
     #if ENABLED(DEBUG_LEVELING_FEATURE)
3965 4016
       const bool query = code_seen('Q');
3966 4017
       const uint8_t old_debug_flags = marlin_debug_flags;
@@ -3970,37 +4021,148 @@ inline void gcode_G28() {
3970 4021
         log_machine_info();
3971 4022
       }
3972 4023
       marlin_debug_flags = old_debug_flags;
3973
-      if (query) return;
4024
+      #if DISABLED(PROBE_MANUALLY)
4025
+        if (query) return;
4026
+      #endif
3974 4027
     #endif
3975 4028
 
3976 4029
     // Don't allow auto-leveling without homing first
3977 4030
     if (axis_unhomed_error(true, true, true)) return;
3978 4031
 
3979
-    const int verbose_level = code_seen('V') ? code_value_int() : 1;
3980
-    if (verbose_level < 0 || verbose_level > 4) {
3981
-      SERIAL_PROTOCOLLNPGM("?(V)erbose Level is implausible (0-4).");
3982
-      return;
3983
-    }
4032
+    // Define local vars 'static' for manual probing, 'auto' otherwise
4033
+    #if ENABLED(PROBE_MANUALLY)
4034
+      #define ABL_VAR static
4035
+    #else
4036
+      #define ABL_VAR
4037
+    #endif
3984 4038
 
3985
-    bool dryrun = code_seen('D'),
3986
-         stow_probe_after_each = code_seen('E');
4039
+    ABL_VAR int verbose_level, abl_probe_index;
4040
+    ABL_VAR float xProbe, yProbe, measured_z;
4041
+    ABL_VAR bool dryrun, abl_should_enable;
4042
+
4043
+    #if HAS_SOFTWARE_ENDSTOPS
4044
+      ABL_VAR bool enable_soft_endstops = true;
4045
+    #endif
3987 4046
 
3988 4047
     #if ABL_GRID
4048
+      ABL_VAR uint8_t PR_OUTER_VAR;
4049
+      ABL_VAR  int8_t PR_INNER_VAR;
4050
+      ABL_VAR int left_probe_bed_position, right_probe_bed_position, front_probe_bed_position, back_probe_bed_position;
4051
+      ABL_VAR float xGridSpacing, yGridSpacing;
3989 4052
 
3990
-      if (verbose_level > 0) {
3991
-        SERIAL_PROTOCOLLNPGM("G29 Auto Bed Leveling");
3992
-        if (dryrun) SERIAL_PROTOCOLLNPGM("Running in DRY-RUN mode");
3993
-      }
4053
+      #define ABL_GRID_MAX (ABL_GRID_MAX_POINTS_X) * (ABL_GRID_MAX_POINTS_Y)
3994 4054
 
3995 4055
       #if ABL_PLANAR
4056
+        ABL_VAR uint8_t abl_grid_points_x = ABL_GRID_MAX_POINTS_X,
4057
+                        abl_grid_points_y = ABL_GRID_MAX_POINTS_Y;
4058
+        ABL_VAR int abl2;
4059
+        ABL_VAR bool do_topography_map;
4060
+      #else // 3-point
4061
+        uint8_t constexpr abl_grid_points_x = ABL_GRID_MAX_POINTS_X,
4062
+                          abl_grid_points_y = ABL_GRID_MAX_POINTS_Y;
4063
+
4064
+        int constexpr abl2 = ABL_GRID_MAX;
4065
+      #endif
4066
+
4067
+      #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
4068
+
4069
+        ABL_VAR float zoffset;
4070
+
4071
+      #elif ENABLED(AUTO_BED_LEVELING_LINEAR)
4072
+
4073
+        ABL_VAR int indexIntoAB[ABL_GRID_MAX_POINTS_X][ABL_GRID_MAX_POINTS_Y];
4074
+
4075
+        ABL_VAR float eqnAMatrix[ABL_GRID_MAX * 3], // "A" matrix of the linear system of equations
4076
+                     eqnBVector[ABL_GRID_MAX],     // "B" vector of Z points
4077
+                     mean;
4078
+      #endif
4079
+
4080
+    #elif ENABLED(AUTO_BED_LEVELING_3POINT)
4081
+
4082
+      // Probe at 3 arbitrary points
4083
+      ABL_VAR vector_3 points[3] = {
4084
+        vector_3(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, 0),
4085
+        vector_3(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, 0),
4086
+        vector_3(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, 0)
4087
+      };
4088
+
4089
+    #endif // AUTO_BED_LEVELING_3POINT
3996 4090
 
3997
-        bool do_topography_map = verbose_level > 2 || code_seen('T');
4091
+    /**
4092
+     * On the initial G29 fetch command parameters.
4093
+     */
4094
+    if (!g29_in_progress) {
4095
+
4096
+      abl_probe_index = 0;
4097
+      abl_should_enable = planner.abl_enabled;
4098
+
4099
+      #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
4100
+
4101
+        if (code_seen('W')) {
4102
+          if (!bilinear_grid_spacing[X_AXIS]) {
4103
+            SERIAL_ERROR_START;
4104
+            SERIAL_ERRORLNPGM("No bilinear grid");
4105
+            return;
4106
+          }
4107
+
4108
+          const float z = code_seen('Z') && code_has_value() ? code_value_float() : 99999;
4109
+          if (!WITHIN(z, -10, 10)) {
4110
+            SERIAL_ERROR_START;
4111
+            SERIAL_ERRORLNPGM("Bad Z value");
4112
+            return;
4113
+          }
4114
+
4115
+          const float x = code_seen('X') && code_has_value() ? code_value_float() : 99999,
4116
+                      y = code_seen('Y') && code_has_value() ? code_value_float() : 99999;
4117
+          int8_t i = code_seen('I') && code_has_value() ? code_value_byte() : -1,
4118
+                 j = code_seen('J') && code_has_value() ? code_value_byte() : -1;
4119
+
4120
+          if (x < 99998 && y < 99998) {
4121
+            // Get nearest i / j from x / y
4122
+            i = (x - LOGICAL_X_POSITION(bilinear_start[X_AXIS]) + 0.5 * xGridSpacing) / xGridSpacing;
4123
+            j = (y - LOGICAL_Y_POSITION(bilinear_start[Y_AXIS]) + 0.5 * yGridSpacing) / yGridSpacing;
4124
+            i = constrain(i, 0, ABL_GRID_MAX_POINTS_X - 1);
4125
+            j = constrain(j, 0, ABL_GRID_MAX_POINTS_Y - 1);
4126
+          }
4127
+          if (WITHIN(i, 0, ABL_GRID_MAX_POINTS_X - 1) && WITHIN(j, 0, ABL_GRID_MAX_POINTS_Y)) {
4128
+            set_bed_leveling_enabled(false);
4129
+            bed_level_grid[i][j] = z;
4130
+            #if ENABLED(ABL_BILINEAR_SUBDIVISION)
4131
+              bed_level_virt_interpolate();
4132
+            #endif
4133
+            set_bed_leveling_enabled(abl_should_enable);
4134
+          }
4135
+          return;
4136
+        } // code_seen('W')
4137
+
4138
+      #endif
4139
+
4140
+      #if PLANNER_LEVELING
4141
+
4142
+        // Jettison bed leveling data
4143
+        if (code_seen('J')) {
4144
+          reset_bed_level();
4145
+          return;
4146
+        }
4147
+
4148
+      #endif
4149
+
4150
+      verbose_level = code_seen('V') && code_has_value() ? code_value_int() : 0;
4151
+      if (!WITHIN(verbose_level, 0, 4)) {
4152
+        SERIAL_PROTOCOLLNPGM("?(V)erbose Level is implausible (0-4).");
4153
+        return;
4154
+      }
4155
+
4156
+      dryrun = code_seen('D') ? code_value_bool() : false;
4157
+
4158
+      #if ENABLED(AUTO_BED_LEVELING_LINEAR)
4159
+
4160
+        do_topography_map = verbose_level > 2 || code_seen('T');
3998 4161
 
3999 4162
         // X and Y specify points in each direction, overriding the default
4000 4163
         // These values may be saved with the completed mesh
4001
-        int abl_grid_points_x = code_seen('X') ? code_value_int() : ABL_GRID_MAX_POINTS_X,
4002
-            abl_grid_points_y = code_seen('Y') ? code_value_int() : ABL_GRID_MAX_POINTS_Y;
4003
-
4164
+        abl_grid_points_x = code_seen('X') ? code_value_int() : ABL_GRID_MAX_POINTS_X;
4165
+        abl_grid_points_y = code_seen('Y') ? code_value_int() : ABL_GRID_MAX_POINTS_Y;
4004 4166
         if (code_seen('P')) abl_grid_points_x = abl_grid_points_y = code_value_int();
4005 4167
 
4006 4168
         if (abl_grid_points_x < 2 || abl_grid_points_y < 2) {
@@ -4008,91 +4170,98 @@ inline void gcode_G28() {
4008 4170
           return;
4009 4171
         }
4010 4172
 
4011
-      #else
4173
+        abl2 = abl_grid_points_x * abl_grid_points_y;
4012 4174
 
4013
-         const uint8_t abl_grid_points_x = ABL_GRID_MAX_POINTS_X, abl_grid_points_y = ABL_GRID_MAX_POINTS_Y;
4175
+      #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
4176
+
4177
+        zoffset = code_seen('Z') ? code_value_axis_units(Z_AXIS) : 0;
4178
+        #if HAS_BED_PROBE
4179
+          zoffset += zprobe_zoffset;
4180
+        #endif
4014 4181
 
4015 4182
       #endif
4016 4183
 
4017
-      xy_probe_feedrate_mm_s = MMM_TO_MMS(code_seen('S') ? code_value_linear_units() : XY_PROBE_SPEED);
4184
+      #if ABL_GRID
4018 4185
 
4019
-      int left_probe_bed_position = code_seen('L') ? (int)code_value_axis_units(X_AXIS) : LOGICAL_X_POSITION(LEFT_PROBE_BED_POSITION),
4020
-          right_probe_bed_position = code_seen('R') ? (int)code_value_axis_units(X_AXIS) : LOGICAL_X_POSITION(RIGHT_PROBE_BED_POSITION),
4021
-          front_probe_bed_position = code_seen('F') ? (int)code_value_axis_units(Y_AXIS) : LOGICAL_Y_POSITION(FRONT_PROBE_BED_POSITION),
4022
-          back_probe_bed_position = code_seen('B') ? (int)code_value_axis_units(Y_AXIS) : LOGICAL_Y_POSITION(BACK_PROBE_BED_POSITION);
4186
+        xy_probe_feedrate_mm_s = MMM_TO_MMS(code_seen('S') ? code_value_linear_units() : XY_PROBE_SPEED);
4023 4187
 
4024
-      const bool left_out_l = left_probe_bed_position < LOGICAL_X_POSITION(MIN_PROBE_X),
4025
-                 left_out = left_out_l || left_probe_bed_position > right_probe_bed_position - (MIN_PROBE_EDGE),
4026
-                 right_out_r = right_probe_bed_position > LOGICAL_X_POSITION(MAX_PROBE_X),
4027
-                 right_out = right_out_r || right_probe_bed_position < left_probe_bed_position + MIN_PROBE_EDGE,
4028
-                 front_out_f = front_probe_bed_position < LOGICAL_Y_POSITION(MIN_PROBE_Y),
4029
-                 front_out = front_out_f || front_probe_bed_position > back_probe_bed_position - (MIN_PROBE_EDGE),
4030
-                 back_out_b = back_probe_bed_position > LOGICAL_Y_POSITION(MAX_PROBE_Y),
4031
-                 back_out = back_out_b || back_probe_bed_position < front_probe_bed_position + MIN_PROBE_EDGE;
4188
+        left_probe_bed_position = code_seen('L') ? (int)code_value_axis_units(X_AXIS) : LOGICAL_X_POSITION(LEFT_PROBE_BED_POSITION);
4189
+        right_probe_bed_position = code_seen('R') ? (int)code_value_axis_units(X_AXIS) : LOGICAL_X_POSITION(RIGHT_PROBE_BED_POSITION);
4190
+        front_probe_bed_position = code_seen('F') ? (int)code_value_axis_units(Y_AXIS) : LOGICAL_Y_POSITION(FRONT_PROBE_BED_POSITION);
4191
+        back_probe_bed_position = code_seen('B') ? (int)code_value_axis_units(Y_AXIS) : LOGICAL_Y_POSITION(BACK_PROBE_BED_POSITION);
4032 4192
 
4033
-      if (left_out || right_out || front_out || back_out) {
4034
-        if (left_out) {
4035
-          out_of_range_error(PSTR("(L)eft"));
4036
-          left_probe_bed_position = left_out_l ? LOGICAL_X_POSITION(MIN_PROBE_X) : right_probe_bed_position - (MIN_PROBE_EDGE);
4037
-        }
4038
-        if (right_out) {
4039
-          out_of_range_error(PSTR("(R)ight"));
4040
-          right_probe_bed_position = right_out_r ? LOGICAL_Y_POSITION(MAX_PROBE_X) : left_probe_bed_position + MIN_PROBE_EDGE;
4041
-        }
4042
-        if (front_out) {
4043
-          out_of_range_error(PSTR("(F)ront"));
4044
-          front_probe_bed_position = front_out_f ? LOGICAL_Y_POSITION(MIN_PROBE_Y) : back_probe_bed_position - (MIN_PROBE_EDGE);
4045
-        }
4046
-        if (back_out) {
4047
-          out_of_range_error(PSTR("(B)ack"));
4048
-          back_probe_bed_position = back_out_b ? LOGICAL_Y_POSITION(MAX_PROBE_Y) : front_probe_bed_position + MIN_PROBE_EDGE;
4049
-        }
4050
-        return;
4051
-      }
4193
+        const bool left_out_l = left_probe_bed_position < LOGICAL_X_POSITION(MIN_PROBE_X),
4194
+                   left_out = left_out_l || left_probe_bed_position > right_probe_bed_position - (MIN_PROBE_EDGE),
4195
+                   right_out_r = right_probe_bed_position > LOGICAL_X_POSITION(MAX_PROBE_X),
4196
+                   right_out = right_out_r || right_probe_bed_position < left_probe_bed_position + MIN_PROBE_EDGE,
4197
+                   front_out_f = front_probe_bed_position < LOGICAL_Y_POSITION(MIN_PROBE_Y),
4198
+                   front_out = front_out_f || front_probe_bed_position > back_probe_bed_position - (MIN_PROBE_EDGE),
4199
+                   back_out_b = back_probe_bed_position > LOGICAL_Y_POSITION(MAX_PROBE_Y),
4200
+                   back_out = back_out_b || back_probe_bed_position < front_probe_bed_position + MIN_PROBE_EDGE;
4052 4201
 
4053
-    #endif // ABL_GRID
4202
+        if (left_out || right_out || front_out || back_out) {
4203
+          if (left_out) {
4204
+            out_of_range_error(PSTR("(L)eft"));
4205
+            left_probe_bed_position = left_out_l ? LOGICAL_X_POSITION(MIN_PROBE_X) : right_probe_bed_position - (MIN_PROBE_EDGE);
4206
+          }
4207
+          if (right_out) {
4208
+            out_of_range_error(PSTR("(R)ight"));
4209
+            right_probe_bed_position = right_out_r ? LOGICAL_Y_POSITION(MAX_PROBE_X) : left_probe_bed_position + MIN_PROBE_EDGE;
4210
+          }
4211
+          if (front_out) {
4212
+            out_of_range_error(PSTR("(F)ront"));
4213
+            front_probe_bed_position = front_out_f ? LOGICAL_Y_POSITION(MIN_PROBE_Y) : back_probe_bed_position - (MIN_PROBE_EDGE);
4214
+          }
4215
+          if (back_out) {
4216
+            out_of_range_error(PSTR("(B)ack"));
4217
+            back_probe_bed_position = back_out_b ? LOGICAL_Y_POSITION(MAX_PROBE_Y) : front_probe_bed_position + MIN_PROBE_EDGE;
4218
+          }
4219
+          return;
4220
+        }
4054 4221
 
4055
-    stepper.synchronize();
4222
+        // probe at the points of a lattice grid
4223
+        xGridSpacing = (right_probe_bed_position - left_probe_bed_position) / (abl_grid_points_x - 1);
4224
+        yGridSpacing = (back_probe_bed_position - front_probe_bed_position) / (abl_grid_points_y - 1);
4056 4225
 
4057
-    // Disable auto bed leveling during G29
4058
-    bool abl_should_enable = planner.abl_enabled;
4226
+      #endif // ABL_GRID
4059 4227
 
4060
-    planner.abl_enabled = false;
4228
+      if (verbose_level > 0) {
4229
+        SERIAL_PROTOCOLLNPGM("G29 Auto Bed Leveling");
4230
+        if (dryrun) SERIAL_PROTOCOLLNPGM("Running in DRY-RUN mode");
4231
+      }
4061 4232
 
4062
-    if (!dryrun) {
4063
-      // Re-orient the current position without leveling
4064
-      // based on where the steppers are positioned.
4065
-      set_current_from_steppers_for_axis(ALL_AXES);
4233
+      stepper.synchronize();
4066 4234
 
4067
-      // Sync the planner to where the steppers stopped
4068
-      SYNC_PLAN_POSITION_KINEMATIC();
4069
-    }
4235
+      // Disable auto bed leveling during G29
4236
+      planner.abl_enabled = false;
4070 4237
 
4071
-    setup_for_endstop_or_probe_move();
4238
+      if (!dryrun) {
4239
+        // Re-orient the current position without leveling
4240
+        // based on where the steppers are positioned.
4241
+        set_current_from_steppers_for_axis(ALL_AXES);
4072 4242
 
4073
-    // Deploy the probe. Probe will raise if needed.
4074
-    if (DEPLOY_PROBE()) {
4075
-      planner.abl_enabled = abl_should_enable;
4076
-      return;
4077
-    }
4243
+        // Sync the planner to where the steppers stopped
4244
+        SYNC_PLAN_POSITION_KINEMATIC();
4245
+      }
4078 4246
 
4079
-    float xProbe = 0, yProbe = 0, measured_z = 0;
4247
+      setup_for_endstop_or_probe_move();
4080 4248
 
4081
-    #if ABL_GRID
4249
+      //xProbe = yProbe = measured_z = 0;
4082 4250
 
4083
-      // probe at the points of a lattice grid
4084
-      const float xGridSpacing = (right_probe_bed_position - left_probe_bed_position) / (abl_grid_points_x - 1),
4085
-                  yGridSpacing = (back_probe_bed_position - front_probe_bed_position) / (abl_grid_points_y - 1);
4251
+      #if HAS_BED_PROBE
4252
+        // Deploy the probe. Probe will raise if needed.
4253
+        if (DEPLOY_PROBE()) {
4254
+          planner.abl_enabled = abl_should_enable;
4255
+          return;
4256
+        }
4257
+      #endif
4086 4258
 
4087 4259
       #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
4088 4260
 
4089
-        float zoffset = zprobe_zoffset;
4090
-        if (code_seen('Z')) zoffset += code_value_axis_units(Z_AXIS);
4091
-
4092 4261
         if ( xGridSpacing != bilinear_grid_spacing[X_AXIS]
4093 4262
           || yGridSpacing != bilinear_grid_spacing[Y_AXIS]
4094
-          || left_probe_bed_position != bilinear_start[X_AXIS]
4095
-          || front_probe_bed_position != bilinear_start[Y_AXIS]
4263
+          || left_probe_bed_position != LOGICAL_X_POSITION(bilinear_start[X_AXIS])
4264
+          || front_probe_bed_position != LOGICAL_Y_POSITION(bilinear_start[Y_AXIS])
4096 4265
         ) {
4097 4266
           if (dryrun) {
4098 4267
             // Before reset bed level, re-enable to correct the position
@@ -4101,164 +4270,311 @@ inline void gcode_G28() {
4101 4270
           // Reset grid to 0.0 or "not probed". (Also disables ABL)
4102 4271
           reset_bed_level();
4103 4272
 
4104
-          #if ENABLED(ABL_BILINEAR_SUBDIVISION)
4105
-            bilinear_grid_spacing_virt[X_AXIS] = xGridSpacing / (BILINEAR_SUBDIVISIONS);
4106
-            bilinear_grid_spacing_virt[Y_AXIS] = yGridSpacing / (BILINEAR_SUBDIVISIONS);
4107
-          #endif
4273
+          // Initialize a grid with the given dimensions
4108 4274
           bilinear_grid_spacing[X_AXIS] = xGridSpacing;
4109 4275
           bilinear_grid_spacing[Y_AXIS] = yGridSpacing;
4110 4276
           bilinear_start[X_AXIS] = RAW_X_POSITION(left_probe_bed_position);
4111 4277
           bilinear_start[Y_AXIS] = RAW_Y_POSITION(front_probe_bed_position);
4112 4278
 
4279
+          #if ENABLED(ABL_BILINEAR_SUBDIVISION)
4280
+            bilinear_grid_spacing_virt[X_AXIS] = xGridSpacing / (BILINEAR_SUBDIVISIONS);
4281
+            bilinear_grid_spacing_virt[Y_AXIS] = yGridSpacing / (BILINEAR_SUBDIVISIONS);
4282
+          #endif
4283
+
4113 4284
           // Can't re-enable (on error) until the new grid is written
4114 4285
           abl_should_enable = false;
4115 4286
         }
4116 4287
 
4117 4288
       #elif ENABLED(AUTO_BED_LEVELING_LINEAR)
4118 4289
 
4119
-        /**
4120
-         * solve the plane equation ax + by + d = z
4121
-         * A is the matrix with rows [x y 1] for all the probed points
4122
-         * B is the vector of the Z positions
4123
-         * the normal vector to the plane is formed by the coefficients of the
4124
-         * plane equation in the standard form, which is Vx*x+Vy*y+Vz*z+d = 0
4125
-         * so Vx = -a Vy = -b Vz = 1 (we want the vector facing towards positive Z
4126
-         */
4290
+        mean = 0.0;
4127 4291
 
4128
-        const int abl2 = abl_grid_points_x * abl_grid_points_y;
4292
+      #endif // AUTO_BED_LEVELING_LINEAR
4129 4293
 
4130
-        int indexIntoAB[abl_grid_points_x][abl_grid_points_y],
4131
-            probe_index = -1;
4294
+      #if ENABLED(AUTO_BED_LEVELING_3POINT)
4132 4295
 
4133
-        float eqnAMatrix[abl2 * 3], // "A" matrix of the linear system of equations
4134
-              eqnBVector[abl2],     // "B" vector of Z points
4135
-              mean = 0.0;
4296
+        #if ENABLED(DEBUG_LEVELING_FEATURE)
4297
+          if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> 3-point Leveling");
4298
+        #endif
4136 4299
 
4137
-      #endif // AUTO_BED_LEVELING_LINEAR
4300
+        // Probe at 3 arbitrary points
4301
+        points[0].z = points[1].z = points[2].z = 0;
4138 4302
 
4139
-      #if ENABLED(PROBE_Y_FIRST)
4140
-        #define PR_OUTER_VAR xCount
4141
-        #define PR_OUTER_NUM abl_grid_points_x
4142
-        #define PR_INNER_VAR yCount
4143
-        #define PR_INNER_NUM abl_grid_points_y
4144
-      #else
4145
-        #define PR_OUTER_VAR yCount
4146
-        #define PR_OUTER_NUM abl_grid_points_y
4147
-        #define PR_INNER_VAR xCount
4148
-        #define PR_INNER_NUM abl_grid_points_x
4149
-      #endif
4303
+      #endif // AUTO_BED_LEVELING_3POINT
4150 4304
 
4151
-      bool zig = PR_OUTER_NUM & 1;  // Always end at RIGHT and BACK_PROBE_BED_POSITION
4305
+    } // !g29_in_progress
4152 4306
 
4153
-      // Outer loop is Y with PROBE_Y_FIRST disabled
4154
-      for (uint8_t PR_OUTER_VAR = 0; PR_OUTER_VAR < PR_OUTER_NUM; PR_OUTER_VAR++) {
4307
+    #if ENABLED(PROBE_MANUALLY)
4155 4308
 
4156
-        int8_t inStart, inStop, inInc;
4309
+      // Abort current G29 procedure, go back to ABLStart
4310
+      if (code_seen('A') && g29_in_progress) {
4311
+        SERIAL_PROTOCOLLNPGM("Manual G29 aborted");
4312
+        #if HAS_SOFTWARE_ENDSTOPS
4313
+          soft_endstops_enabled = enable_soft_endstops;
4314
+        #endif
4315
+        planner.abl_enabled = abl_should_enable;
4316
+        g29_in_progress = false;
4317
+      }
4157 4318
 
4158
-        if (zig) { // away from origin
4159
-          inStart = 0;
4160
-          inStop = PR_INNER_NUM;
4161
-          inInc = 1;
4162
-        }
4163
-        else {     // towards origin
4164
-          inStart = PR_INNER_NUM - 1;
4165
-          inStop = -1;
4166
-          inInc = -1;
4319
+      // Query G29 status
4320
+      if (code_seen('Q')) {
4321
+        if (!g29_in_progress)
4322
+          SERIAL_PROTOCOLLNPGM("Manual G29 idle");
4323
+        else {
4324
+          SERIAL_PROTOCOLPAIR("Manual G29 point ", abl_probe_index + 1);
4325
+          SERIAL_PROTOCOLLNPAIR(" of ", abl2);
4167 4326
         }
4327
+      }
4328
+
4329
+      if (code_seen('A') || code_seen('Q')) return;
4168 4330
 
4169
-        zig = !zig; // zag
4331
+      // Fall through to probe the first point
4332
+      g29_in_progress = true;
4333
+
4334
+      if (abl_probe_index == 0) {
4335
+        // For the initial G29 S2 save software endstop state
4336
+        #if HAS_SOFTWARE_ENDSTOPS
4337
+          enable_soft_endstops = soft_endstops_enabled;
4338
+        #endif
4339
+      }
4340
+      else {
4341
+        // For G29 after adjusting Z.
4342
+        // Save the previous Z before going to the next point
4343
+        measured_z = current_position[Z_AXIS];
4344
+
4345
+        #if ENABLED(AUTO_BED_LEVELING_LINEAR)
4346
+
4347
+          mean += measured_z;
4348
+          eqnBVector[abl_probe_index] = measured_z;
4349
+          eqnAMatrix[abl_probe_index + 0 * abl2] = xProbe;
4350
+          eqnAMatrix[abl_probe_index + 1 * abl2] = yProbe;
4351
+          eqnAMatrix[abl_probe_index + 2 * abl2] = 1;
4352
+
4353
+        #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
4170 4354
 
4171
-        // Inner loop is Y with PROBE_Y_FIRST enabled
4172
-        for (int8_t PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; PR_INNER_VAR += inInc) {
4355
+          bed_level_grid[xCount][yCount] = measured_z + zoffset;
4173 4356
 
4174
-          float xBase = left_probe_bed_position + xGridSpacing * xCount,
4175
-                yBase = front_probe_bed_position + yGridSpacing * yCount;
4357
+        #elif ENABLED(AUTO_BED_LEVELING_3POINT)
4358
+
4359
+          points[i].z = measured_z;
4360
+
4361
+        #endif
4362
+      }
4363
+
4364
+      //
4365
+      // If there's another point to sample, move there with optional lift.
4366
+      //
4367
+
4368
+      #if ABL_GRID
4369
+
4370
+        // Find a next point to probe
4371
+        // On the first G29 this will be the first probe point
4372
+        while (abl_probe_index < abl2) {
4373
+
4374
+          // Set xCount, yCount based on abl_probe_index, with zig-zag
4375
+          PR_OUTER_VAR = abl_probe_index / PR_INNER_END;
4376
+          PR_INNER_VAR = abl_probe_index - (PR_OUTER_VAR * PR_INNER_END);
4377
+
4378
+          bool zig = (PR_OUTER_VAR & 1) != ((PR_OUTER_END) & 1);
4379
+
4380
+          if (zig) PR_INNER_VAR = (PR_INNER_END - 1) - PR_INNER_VAR;
4381
+
4382
+          const float xBase = left_probe_bed_position + xGridSpacing * xCount,
4383
+                      yBase = front_probe_bed_position + yGridSpacing * yCount;
4176 4384
 
4177 4385
           xProbe = floor(xBase + (xBase < 0 ? 0 : 0.5));
4178 4386
           yProbe = floor(yBase + (yBase < 0 ? 0 : 0.5));
4179 4387
 
4180 4388
           #if ENABLED(AUTO_BED_LEVELING_LINEAR)
4181
-            indexIntoAB[xCount][yCount] = ++probe_index;
4389
+            indexIntoAB[xCount][yCount] = abl_probe_index;
4390
+          #endif
4391
+
4392
+          float pos[XYZ] = { xProbe, yProbe, 0 };
4393
+          if (position_is_reachable(pos)) break;
4394
+          ++abl_probe_index;
4395
+        }
4396
+
4397
+        // Is there a next point to move to?
4398
+        if (abl_probe_index < abl2) {
4399
+          _manual_goto_xy(xProbe, yProbe); // Can be used here too!
4400
+          ++abl_probe_index;
4401
+          #if HAS_SOFTWARE_ENDSTOPS
4402
+            // Disable software endstops to allow manual adjustment
4403
+            // If G29 is not completed, they will not be re-enabled
4404
+            soft_endstops_enabled = false;
4182 4405
           #endif
4406
+          return;
4407
+        }
4408
+        else {
4409
+          // Then leveling is done!
4410
+          // G29 finishing code goes here
4183 4411
 
4184
-          #if IS_KINEMATIC
4185
-            // Avoid probing outside the round or hexagonal area
4186
-            float pos[XYZ] = { xProbe, yProbe, 0 };
4187
-            if (!position_is_reachable(pos, true)) continue;
4412
+          // After recording the last point, activate abl
4413
+          SERIAL_PROTOCOLLNPGM("Grid probing done.");
4414
+          g29_in_progress = false;
4415
+
4416
+          // Re-enable software endstops, if needed
4417
+          #if HAS_SOFTWARE_ENDSTOPS
4418
+            soft_endstops_enabled = enable_soft_endstops;
4188 4419
           #endif
4420
+        }
4189 4421
 
4190
-          measured_z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
4422
+      #elif ENABLED(AUTO_BED_LEVELING_3POINT)
4191 4423
 
4192
-          if (measured_z == NAN) {
4193
-            planner.abl_enabled = abl_should_enable;
4194
-            return;
4424
+        // Probe at 3 arbitrary points
4425
+        if (abl_probe_index < 3) {
4426
+          xProbe = LOGICAL_X_POSITION(points[i].x);
4427
+          yProbe = LOGICAL_Y_POSITION(points[i].y);
4428
+          ++abl_probe_index;
4429
+          #if HAS_SOFTWARE_ENDSTOPS
4430
+            // Disable software endstops to allow manual adjustment
4431
+            // If G29 is not completed, they will not be re-enabled
4432
+            soft_endstops_enabled = false;
4433
+          #endif
4434
+          return;
4435
+        }
4436
+        else {
4437
+
4438
+          SERIAL_PROTOCOLLNPGM("3-point probing done.");
4439
+          g29_in_progress = false;
4440
+
4441
+          // Re-enable software endstops, if needed
4442
+          #if HAS_SOFTWARE_ENDSTOPS
4443
+            soft_endstops_enabled = enable_soft_endstops;
4444
+          #endif
4445
+
4446
+          if (!dryrun) {
4447
+            vector_3 planeNormal = vector_3::cross(points[0] - points[1], points[2] - points[1]).get_normal();
4448
+            if (planeNormal.z < 0) {
4449
+              planeNormal.x *= -1;
4450
+              planeNormal.y *= -1;
4451
+              planeNormal.z *= -1;
4452
+            }
4453
+            planner.bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
4454
+
4455
+            // Can't re-enable (on error) until the new grid is written
4456
+            abl_should_enable = false;
4195 4457
           }
4196 4458
 
4197
-          #if ENABLED(AUTO_BED_LEVELING_LINEAR)
4459
+        }
4198 4460
 
4199
-            mean += measured_z;
4200
-            eqnBVector[probe_index] = measured_z;
4201
-            eqnAMatrix[probe_index + 0 * abl2] = xProbe;
4202
-            eqnAMatrix[probe_index + 1 * abl2] = yProbe;
4203
-            eqnAMatrix[probe_index + 2 * abl2] = 1;
4461
+      #endif // AUTO_BED_LEVELING_3POINT
4204 4462
 
4205
-          #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
4206 4463
 
4207
-            bed_level_grid[xCount][yCount] = measured_z + zoffset;
4464
+    #else // !PROBE_MANUALLY
4208 4465
 
4209
-          #endif
4210 4466
 
4211
-          idle();
4467
+      bool stow_probe_after_each = code_seen('E');
4212 4468
 
4213
-        } // inner
4214
-      } // outer
4469
+      #if ABL_GRID
4215 4470
 
4216
-    #elif ENABLED(AUTO_BED_LEVELING_3POINT)
4471
+        bool zig = PR_OUTER_END & 1;  // Always end at RIGHT and BACK_PROBE_BED_POSITION
4217 4472
 
4218
-      #if ENABLED(DEBUG_LEVELING_FEATURE)
4219
-        if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> 3-point Leveling");
4220
-      #endif
4473
+        // Outer loop is Y with PROBE_Y_FIRST disabled
4474
+        for (uint8_t PR_OUTER_VAR = 0; PR_OUTER_VAR < PR_OUTER_END; PR_OUTER_VAR++) {
4221 4475
 
4222
-      // Probe at 3 arbitrary points
4223
-      vector_3 points[3] = {
4224
-        vector_3(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, 0),
4225
-        vector_3(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, 0),
4226
-        vector_3(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, 0)
4227
-      };
4476
+          int8_t inStart, inStop, inInc;
4228 4477
 
4229
-      for (uint8_t i = 0; i < 3; ++i) {
4230
-        // Retain the last probe position
4231
-        xProbe = LOGICAL_X_POSITION(points[i].x);
4232
-        yProbe = LOGICAL_Y_POSITION(points[i].y);
4233
-        measured_z = points[i].z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
4234
-      }
4478
+          if (zig) { // away from origin
4479
+            inStart = 0;
4480
+            inStop = PR_INNER_END;
4481
+            inInc = 1;
4482
+          }
4483
+          else {     // towards origin
4484
+            inStart = PR_INNER_END - 1;
4485
+            inStop = -1;
4486
+            inInc = -1;
4487
+          }
4235 4488
 
4236
-      if (measured_z == NAN) {
4237
-        planner.abl_enabled = abl_should_enable;
4238
-        return;
4239
-      }
4489
+          zig = !zig; // zag
4240 4490
 
4241
-      if (!dryrun) {
4242
-        vector_3 planeNormal = vector_3::cross(points[0] - points[1], points[2] - points[1]).get_normal();
4243
-        if (planeNormal.z < 0) {
4244
-          planeNormal.x *= -1;
4245
-          planeNormal.y *= -1;
4246
-          planeNormal.z *= -1;
4491
+          // Inner loop is Y with PROBE_Y_FIRST enabled
4492
+          for (int8_t PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; PR_INNER_VAR += inInc) {
4493
+
4494
+            float xBase = left_probe_bed_position + xGridSpacing * xCount,
4495
+                  yBase = front_probe_bed_position + yGridSpacing * yCount;
4496
+
4497
+            xProbe = floor(xBase + (xBase < 0 ? 0 : 0.5));
4498
+            yProbe = floor(yBase + (yBase < 0 ? 0 : 0.5));
4499
+
4500
+            #if ENABLED(AUTO_BED_LEVELING_LINEAR)
4501
+              indexIntoAB[xCount][yCount] = ++abl_probe_index;
4502
+            #endif
4503
+
4504
+            #if IS_KINEMATIC
4505
+              // Avoid probing outside the round or hexagonal area
4506
+              float pos[XYZ] = { xProbe, yProbe, 0 };
4507
+              if (!position_is_reachable(pos, true)) continue;
4508
+            #endif
4509
+
4510
+            measured_z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
4511
+
4512
+            if (measured_z == NAN) {
4513
+              planner.abl_enabled = abl_should_enable;
4514
+              return;
4515
+            }
4516
+
4517
+            #if ENABLED(AUTO_BED_LEVELING_LINEAR)
4518
+
4519
+              mean += measured_z;
4520
+              eqnBVector[abl_probe_index] = measured_z;
4521
+              eqnAMatrix[abl_probe_index + 0 * abl2] = xProbe;
4522
+              eqnAMatrix[abl_probe_index + 1 * abl2] = yProbe;
4523
+              eqnAMatrix[abl_probe_index + 2 * abl2] = 1;
4524
+
4525
+            #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
4526
+
4527
+              bed_level_grid[xCount][yCount] = measured_z + zoffset;
4528
+
4529
+            #endif
4530
+
4531
+            abl_should_enable = false;
4532
+            idle();
4533
+
4534
+          } // inner
4535
+        } // outer
4536
+
4537
+      #elif ENABLED(AUTO_BED_LEVELING_3POINT)
4538
+
4539
+        // Probe at 3 arbitrary points
4540
+
4541
+        for (uint8_t i = 0; i < 3; ++i) {
4542
+          // Retain the last probe position
4543
+          xProbe = LOGICAL_X_POSITION(points[i].x);
4544
+          yProbe = LOGICAL_Y_POSITION(points[i].y);
4545
+          measured_z = points[i].z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
4247 4546
         }
4248
-        planner.bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
4249 4547
 
4250
-        // Can't re-enable (on error) until the new grid is written
4251
-        abl_should_enable = false;
4252
-      }
4548
+        if (measured_z == NAN) {
4549
+          planner.abl_enabled = abl_should_enable;
4550
+          return;
4551
+        }
4253 4552
 
4254
-    #endif // AUTO_BED_LEVELING_3POINT
4553
+        if (!dryrun) {
4554
+          vector_3 planeNormal = vector_3::cross(points[0] - points[1], points[2] - points[1]).get_normal();
4555
+          if (planeNormal.z < 0) {
4556
+            planeNormal.x *= -1;
4557
+            planeNormal.y *= -1;
4558
+            planeNormal.z *= -1;
4559
+          }
4560
+          planner.bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
4255 4561
 
4256
-    // Raise to _Z_CLEARANCE_DEPLOY_PROBE. Stow the probe.
4257
-    if (STOW_PROBE()) {
4258
-      planner.abl_enabled = abl_should_enable;
4259
-      return;
4260
-    }
4562
+          // Can't re-enable (on error) until the new grid is written
4563
+          abl_should_enable = false;
4564
+        }
4565
+
4566
+      #endif // AUTO_BED_LEVELING_3POINT
4261 4567
 
4568
+      // Raise to _Z_CLEARANCE_DEPLOY_PROBE. Stow the probe.
4569
+      if (STOW_PROBE()) {
4570
+        planner.abl_enabled = abl_should_enable;
4571
+        return;
4572
+      }
4573
+
4574
+    #endif // !PROBE_MANUALLY
4575
+
4576
+    //
4577
+    // G29 Finishing Code
4262 4578
     //
4263 4579
     // Unless this is a dry run, auto bed leveling will
4264 4580
     // definitely be enabled after this point
@@ -4286,7 +4602,14 @@ inline void gcode_G28() {
4286 4602
 
4287 4603
       // For LINEAR leveling calculate matrix, print reports, correct the position
4288 4604
 
4289
-      // solve lsq problem
4605
+      /**
4606
+       * solve the plane equation ax + by + d = z
4607
+       * A is the matrix with rows [x y 1] for all the probed points
4608
+       * B is the vector of the Z positions
4609
+       * the normal vector to the plane is formed by the coefficients of the
4610
+       * plane equation in the standard form, which is Vx*x+Vy*y+Vz*z+d = 0
4611
+       * so Vx = -a Vy = -b Vz = 1 (we want the vector facing towards positive Z
4612
+       */
4290 4613
       float plane_equation_coefficients[3];
4291 4614
       qr_solve(plane_equation_coefficients, abl2, 3, eqnAMatrix, eqnBVector);
4292 4615
 

+ 9
- 7
Marlin/SanityCheck.h View File

@@ -130,8 +130,12 @@
130 130
   #error "Z_RAISE_PROBE_DEPLOY_STOW and Z_RAISE_BETWEEN_PROBINGS are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES. Please update your configuration."
131 131
 #elif defined(Z_PROBE_DEPLOY_HEIGHT) || defined(Z_PROBE_TRAVEL_HEIGHT)
132 132
   #error "Z_PROBE_DEPLOY_HEIGHT and Z_PROBE_TRAVEL_HEIGHT are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES. Please update your configuration."
133
+#elif defined(MANUAL_BED_LEVELING)
134
+  #error "MANUAL_BED_LEVELING is now LCD_BED_LEVELING. Please update your configuration."
133 135
 #elif defined(MESH_HOME_SEARCH_Z)
134
-  #error "MESH_HOME_SEARCH_Z is now MANUAL_PROBE_Z_RANGE. Please update your configuration."
136
+  #error "MESH_HOME_SEARCH_Z is now LCD_PROBE_Z_RANGE. Please update your configuration."
137
+#elif defined(MANUAL_PROBE_Z_RANGE)
138
+  #error "MANUAL_PROBE_Z_RANGE is now LCD_PROBE_Z_RANGE. Please update your configuration."
135 139
 #elif !defined(MIN_STEPS_PER_SEGMENT)
136 140
   #error Please replace "const int dropsegments" with "#define MIN_STEPS_PER_SEGMENT" (and increase by 1) in Configuration_adv.h.
137 141
 #elif defined(PREVENT_DANGEROUS_EXTRUDE)
@@ -408,8 +412,6 @@ static_assert(1 >= 0
408 412
   #elif MESH_NUM_X_POINTS > 9 || MESH_NUM_Y_POINTS > 9
409 413
     #error "MESH_NUM_X_POINTS and MESH_NUM_Y_POINTS must be less than 10."
410 414
   #endif
411
-#elif ENABLED(MANUAL_BED_LEVELING)
412
-  #error "MANUAL_BED_LEVELING only applies to MESH_BED_LEVELING."
413 415
 #endif
414 416
 
415 417
 /**
@@ -492,7 +494,7 @@ static_assert(1 >= 0
492 494
     #if !HAS_Z_MIN_PROBE_PIN
493 495
       #error "Z_MIN_PROBE_ENDSTOP requires the Z_MIN_PROBE_PIN to be defined."
494 496
     #endif
495
-  #else
497
+  #elif DISABLED(PROBE_MANUALLY)
496 498
     #error "You must enable either Z_MIN_PROBE_ENDSTOP or Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use a probe."
497 499
   #endif
498 500
 
@@ -523,10 +525,10 @@ static_assert(1 >= 0
523 525
 #endif
524 526
 
525 527
 /**
526
- * MANUAL_BED_LEVELING requirements
528
+ * LCD_BED_LEVELING requirements
527 529
  */
528
-#if ENABLED(MANUAL_BED_LEVELING) && DISABLED(MESH_BED_LEVELING)
529
-  #error "MANUAL_BED_LEVELING requires MESH_BED_LEVELING."
530
+#if ENABLED(LCD_BED_LEVELING) && DISABLED(MESH_BED_LEVELING) && !(HAS_ABL && ENABLED(PROBE_MANUALLY))
531
+  #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or PROBE_MANUALLY."
530 532
 #endif
531 533
 
532 534
 /**

+ 0
- 10
Marlin/enum.h View File

@@ -165,16 +165,6 @@ enum TempState {
165 165
   };
166 166
 #endif
167 167
 
168
-#if ENABLED(PROBE_MANUALLY)
169
-  enum ABLState {
170
-    ABLReport,
171
-    ABLStart,
172
-    ABLNext,
173
-    ABLSet,
174
-    ABLReset
175
-  };
176
-#endif
177
-
178 168
 /**
179 169
  * SD Card
180 170
  */

+ 19
- 11
Marlin/example_configurations/Cartesio/Configuration.h View File

@@ -232,7 +232,7 @@
232 232
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
233 233
  *    66 : 4.7M High Temperature thermistor from Dyze Design
234 234
  *    70 : the 100K thermistor found in the bq Hephestos 2
235
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
235
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
236 236
  *
237 237
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
238 238
  *                              (but gives greater accuracy and more stable PID)
@@ -545,6 +545,11 @@
545 545
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
546 546
 //
547 547
 
548
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
549
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
550
+// or (with LCD_BED_LEVELING) the LCD controller.
551
+//#define PROBE_MANUALLY
552
+
548 553
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
549 554
 // For example an inductive probe, or a setup that uses the nozzle to probe.
550 555
 // An inductive probe must be deactivated to go below
@@ -741,7 +746,6 @@
741 746
   #define FILAMENT_RUNOUT_SCRIPT "M600"
742 747
 #endif
743 748
 
744
-
745 749
 //===========================================================================
746 750
 //=============================== Bed Leveling ==============================
747 751
 //===========================================================================
@@ -877,14 +881,18 @@
877 881
 
878 882
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
879 883
 
880
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
881
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
884
+#endif // BED_LEVELING
882 885
 
883
-  #if ENABLED(MANUAL_BED_LEVELING)
884
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
885
-  #endif
886
+/**
887
+ * Use the LCD controller for bed leveling
888
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
889
+ */
890
+//#define LCD_BED_LEVELING
886 891
 
887
-#endif // BED_LEVELING
892
+#if ENABLED(LCD_BED_LEVELING)
893
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
894
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
895
+#endif
888 896
 
889 897
 /**
890 898
  * Commands to execute at the end of G29 probing.
@@ -1433,13 +1441,13 @@
1433 1441
 
1434 1442
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1435 1443
 // be used to mitigate the associated resolution loss. If enabled,
1436
-// some of the PWM cycles are stretched so on average the wanted
1444
+// some of the PWM cycles are stretched so on average the desired
1437 1445
 // duty cycle is attained.
1438 1446
 //#define SOFT_PWM_DITHER
1439 1447
 
1440 1448
 // Temperature status LEDs that display the hotend and bed temperature.
1441
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1442
-// Otherwise the RED led is on. There is 1C hysteresis.
1449
+// If all hotends, bed temperature, and target temperature are under 54C
1450
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1443 1451
 #define TEMP_STAT_LEDS
1444 1452
 
1445 1453
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/Felix/Configuration.h View File

@@ -231,7 +231,7 @@
231 231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
232 232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
233 233
  *    70 : the 100K thermistor found in the bq Hephestos 2
234
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
234
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
235 235
  *
236 236
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
237 237
  *                              (but gives greater accuracy and more stable PID)
@@ -528,6 +528,11 @@
528 528
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
529 529
 //
530 530
 
531
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
532
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
533
+// or (with LCD_BED_LEVELING) the LCD controller.
534
+//#define PROBE_MANUALLY
535
+
531 536
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
532 537
 // For example an inductive probe, or a setup that uses the nozzle to probe.
533 538
 // An inductive probe must be deactivated to go below
@@ -724,7 +729,6 @@
724 729
   #define FILAMENT_RUNOUT_SCRIPT "M600"
725 730
 #endif
726 731
 
727
-
728 732
 //===========================================================================
729 733
 //=============================== Bed Leveling ==============================
730 734
 //===========================================================================
@@ -860,14 +864,18 @@
860 864
 
861 865
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
862 866
 
863
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
864
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
867
+#endif // BED_LEVELING
865 868
 
866
-  #if ENABLED(MANUAL_BED_LEVELING)
867
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
868
-  #endif
869
+/**
870
+ * Use the LCD controller for bed leveling
871
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
872
+ */
873
+//#define LCD_BED_LEVELING
869 874
 
870
-#endif // BED_LEVELING
875
+#if ENABLED(LCD_BED_LEVELING)
876
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
877
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
878
+#endif
871 879
 
872 880
 /**
873 881
  * Commands to execute at the end of G29 probing.
@@ -1416,13 +1424,13 @@
1416 1424
 
1417 1425
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1418 1426
 // be used to mitigate the associated resolution loss. If enabled,
1419
-// some of the PWM cycles are stretched so on average the wanted
1427
+// some of the PWM cycles are stretched so on average the desired
1420 1428
 // duty cycle is attained.
1421 1429
 //#define SOFT_PWM_DITHER
1422 1430
 
1423 1431
 // Temperature status LEDs that display the hotend and bed temperature.
1424
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1425
-// Otherwise the RED led is on. There is 1C hysteresis.
1432
+// If all hotends, bed temperature, and target temperature are under 54C
1433
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1426 1434
 //#define TEMP_STAT_LEDS
1427 1435
 
1428 1436
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/Felix/DUAL/Configuration.h View File

@@ -231,7 +231,7 @@
231 231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
232 232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
233 233
  *    70 : the 100K thermistor found in the bq Hephestos 2
234
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
234
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
235 235
  *
236 236
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
237 237
  *                              (but gives greater accuracy and more stable PID)
@@ -528,6 +528,11 @@
528 528
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
529 529
 //
530 530
 
531
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
532
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
533
+// or (with LCD_BED_LEVELING) the LCD controller.
534
+//#define PROBE_MANUALLY
535
+
531 536
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
532 537
 // For example an inductive probe, or a setup that uses the nozzle to probe.
533 538
 // An inductive probe must be deactivated to go below
@@ -724,7 +729,6 @@
724 729
   #define FILAMENT_RUNOUT_SCRIPT "M600"
725 730
 #endif
726 731
 
727
-
728 732
 //===========================================================================
729 733
 //=============================== Bed Leveling ==============================
730 734
 //===========================================================================
@@ -860,14 +864,18 @@
860 864
 
861 865
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
862 866
 
863
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
864
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
867
+#endif // BED_LEVELING
865 868
 
866
-  #if ENABLED(MANUAL_BED_LEVELING)
867
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
868
-  #endif
869
+/**
870
+ * Use the LCD controller for bed leveling
871
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
872
+ */
873
+//#define LCD_BED_LEVELING
869 874
 
870
-#endif // BED_LEVELING
875
+#if ENABLED(LCD_BED_LEVELING)
876
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
877
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
878
+#endif
871 879
 
872 880
 /**
873 881
  * Commands to execute at the end of G29 probing.
@@ -1416,13 +1424,13 @@
1416 1424
 
1417 1425
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1418 1426
 // be used to mitigate the associated resolution loss. If enabled,
1419
-// some of the PWM cycles are stretched so on average the wanted
1427
+// some of the PWM cycles are stretched so on average the desired
1420 1428
 // duty cycle is attained.
1421 1429
 //#define SOFT_PWM_DITHER
1422 1430
 
1423 1431
 // Temperature status LEDs that display the hotend and bed temperature.
1424
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1425
-// Otherwise the RED led is on. There is 1C hysteresis.
1432
+// If all hotends, bed temperature, and target temperature are under 54C
1433
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1426 1434
 //#define TEMP_STAT_LEDS
1427 1435
 
1428 1436
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -234,7 +234,7 @@
234 234
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
235 235
  *    66 : 4.7M High Temperature thermistor from Dyze Design
236 236
  *    70 : the 100K thermistor found in the bq Hephestos 2
237
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
237
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
238 238
  *
239 239
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
240 240
  *                              (but gives greater accuracy and more stable PID)
@@ -537,6 +537,11 @@
537 537
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
538 538
 //
539 539
 
540
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
541
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
542
+// or (with LCD_BED_LEVELING) the LCD controller.
543
+//#define PROBE_MANUALLY
544
+
540 545
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
541 546
 // For example an inductive probe, or a setup that uses the nozzle to probe.
542 547
 // An inductive probe must be deactivated to go below
@@ -733,7 +738,6 @@
733 738
   #define FILAMENT_RUNOUT_SCRIPT "M600"
734 739
 #endif
735 740
 
736
-
737 741
 //===========================================================================
738 742
 //=============================== Bed Leveling ==============================
739 743
 //===========================================================================
@@ -869,14 +873,18 @@
869 873
 
870 874
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
871 875
 
872
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
873
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
876
+#endif // BED_LEVELING
874 877
 
875
-  #if ENABLED(MANUAL_BED_LEVELING)
876
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
877
-  #endif
878
+/**
879
+ * Use the LCD controller for bed leveling
880
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
881
+ */
882
+//#define LCD_BED_LEVELING
878 883
 
879
-#endif // BED_LEVELING
884
+#if ENABLED(LCD_BED_LEVELING)
885
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
886
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
887
+#endif
880 888
 
881 889
 /**
882 890
  * Commands to execute at the end of G29 probing.
@@ -1425,13 +1433,13 @@
1425 1433
 
1426 1434
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1427 1435
 // be used to mitigate the associated resolution loss. If enabled,
1428
-// some of the PWM cycles are stretched so on average the wanted
1436
+// some of the PWM cycles are stretched so on average the desired
1429 1437
 // duty cycle is attained.
1430 1438
 //#define SOFT_PWM_DITHER
1431 1439
 
1432 1440
 // Temperature status LEDs that display the hotend and bed temperature.
1433
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1434
-// Otherwise the RED led is on. There is 1C hysteresis.
1441
+// If all hotends, bed temperature, and target temperature are under 54C
1442
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1435 1443
 //#define TEMP_STAT_LEDS
1436 1444
 
1437 1445
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/Hephestos_2/Configuration.h View File

@@ -231,7 +231,7 @@
231 231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
232 232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
233 233
  *    70 : the 100K thermistor found in the bq Hephestos 2
234
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
234
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
235 235
  *
236 236
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
237 237
  *                              (but gives greater accuracy and more stable PID)
@@ -539,6 +539,11 @@
539 539
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
540 540
 //
541 541
 
542
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
543
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
544
+// or (with LCD_BED_LEVELING) the LCD controller.
545
+//#define PROBE_MANUALLY
546
+
542 547
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
543 548
 // For example an inductive probe, or a setup that uses the nozzle to probe.
544 549
 // An inductive probe must be deactivated to go below
@@ -735,7 +740,6 @@
735 740
   #define FILAMENT_RUNOUT_SCRIPT "M600"
736 741
 #endif
737 742
 
738
-
739 743
 //===========================================================================
740 744
 //=============================== Bed Leveling ==============================
741 745
 //===========================================================================
@@ -871,14 +875,18 @@
871 875
 
872 876
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
873 877
 
874
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
875
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
878
+#endif // BED_LEVELING
876 879
 
877
-  #if ENABLED(MANUAL_BED_LEVELING)
878
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
879
-  #endif
880
+/**
881
+ * Use the LCD controller for bed leveling
882
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
883
+ */
884
+//#define LCD_BED_LEVELING
880 885
 
881
-#endif // BED_LEVELING
886
+#if ENABLED(LCD_BED_LEVELING)
887
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
888
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
889
+#endif
882 890
 
883 891
 /**
884 892
  * Commands to execute at the end of G29 probing.
@@ -1427,13 +1435,13 @@
1427 1435
 
1428 1436
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1429 1437
 // be used to mitigate the associated resolution loss. If enabled,
1430
-// some of the PWM cycles are stretched so on average the wanted
1438
+// some of the PWM cycles are stretched so on average the desired
1431 1439
 // duty cycle is attained.
1432 1440
 //#define SOFT_PWM_DITHER
1433 1441
 
1434 1442
 // Temperature status LEDs that display the hotend and bed temperature.
1435
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1436
-// Otherwise the RED led is on. There is 1C hysteresis.
1443
+// If all hotends, bed temperature, and target temperature are under 54C
1444
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1437 1445
 //#define TEMP_STAT_LEDS
1438 1446
 
1439 1447
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/K8200/Configuration.h View File

@@ -251,7 +251,7 @@
251 251
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
252 252
  *    66 : 4.7M High Temperature thermistor from Dyze Design
253 253
  *    70 : the 100K thermistor found in the bq Hephestos 2
254
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
254
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
255 255
  *
256 256
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
257 257
  *                              (but gives greater accuracy and more stable PID)
@@ -574,6 +574,11 @@
574 574
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
575 575
 //
576 576
 
577
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
578
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
579
+// or (with LCD_BED_LEVELING) the LCD controller.
580
+//#define PROBE_MANUALLY
581
+
577 582
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
578 583
 // For example an inductive probe, or a setup that uses the nozzle to probe.
579 584
 // An inductive probe must be deactivated to go below
@@ -770,7 +775,6 @@
770 775
   #define FILAMENT_RUNOUT_SCRIPT "M600"
771 776
 #endif
772 777
 
773
-
774 778
 //===========================================================================
775 779
 //=============================== Bed Leveling ==============================
776 780
 //===========================================================================
@@ -906,14 +910,18 @@
906 910
 
907 911
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
908 912
 
909
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
910
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
913
+#endif // BED_LEVELING
911 914
 
912
-  #if ENABLED(MANUAL_BED_LEVELING)
913
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
914
-  #endif
915
+/**
916
+ * Use the LCD controller for bed leveling
917
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
918
+ */
919
+//#define LCD_BED_LEVELING
915 920
 
916
-#endif // BED_LEVELING
921
+#if ENABLED(LCD_BED_LEVELING)
922
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
923
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
924
+#endif
917 925
 
918 926
 /**
919 927
  * Commands to execute at the end of G29 probing.
@@ -1467,13 +1475,13 @@
1467 1475
 
1468 1476
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1469 1477
 // be used to mitigate the associated resolution loss. If enabled,
1470
-// some of the PWM cycles are stretched so on average the wanted
1478
+// some of the PWM cycles are stretched so on average the desired
1471 1479
 // duty cycle is attained.
1472 1480
 //#define SOFT_PWM_DITHER
1473 1481
 
1474 1482
 // Temperature status LEDs that display the hotend and bed temperature.
1475
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1476
-// Otherwise the RED led is on. There is 1C hysteresis.
1483
+// If all hotends, bed temperature, and target temperature are under 54C
1484
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1477 1485
 //#define TEMP_STAT_LEDS
1478 1486
 
1479 1487
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/K8400/Configuration.h View File

@@ -231,7 +231,7 @@
231 231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
232 232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
233 233
  *    70 : the 100K thermistor found in the bq Hephestos 2
234
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
234
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
235 235
  *
236 236
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
237 237
  *                              (but gives greater accuracy and more stable PID)
@@ -545,6 +545,11 @@
545 545
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
546 546
 //
547 547
 
548
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
549
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
550
+// or (with LCD_BED_LEVELING) the LCD controller.
551
+//#define PROBE_MANUALLY
552
+
548 553
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
549 554
 // For example an inductive probe, or a setup that uses the nozzle to probe.
550 555
 // An inductive probe must be deactivated to go below
@@ -741,7 +746,6 @@
741 746
   #define FILAMENT_RUNOUT_SCRIPT "M600"
742 747
 #endif
743 748
 
744
-
745 749
 //===========================================================================
746 750
 //=============================== Bed Leveling ==============================
747 751
 //===========================================================================
@@ -877,14 +881,18 @@
877 881
 
878 882
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
879 883
 
880
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
881
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
884
+#endif // BED_LEVELING
882 885
 
883
-  #if ENABLED(MANUAL_BED_LEVELING)
884
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
885
-  #endif
886
+/**
887
+ * Use the LCD controller for bed leveling
888
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
889
+ */
890
+//#define LCD_BED_LEVELING
886 891
 
887
-#endif // BED_LEVELING
892
+#if ENABLED(LCD_BED_LEVELING)
893
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
894
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
895
+#endif
888 896
 
889 897
 /**
890 898
  * Commands to execute at the end of G29 probing.
@@ -1433,13 +1441,13 @@
1433 1441
 
1434 1442
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1435 1443
 // be used to mitigate the associated resolution loss. If enabled,
1436
-// some of the PWM cycles are stretched so on average the wanted
1444
+// some of the PWM cycles are stretched so on average the desired
1437 1445
 // duty cycle is attained.
1438 1446
 //#define SOFT_PWM_DITHER
1439 1447
 
1440 1448
 // Temperature status LEDs that display the hotend and bed temperature.
1441
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1442
-// Otherwise the RED led is on. There is 1C hysteresis.
1449
+// If all hotends, bed temperature, and target temperature are under 54C
1450
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1443 1451
 //#define TEMP_STAT_LEDS
1444 1452
 
1445 1453
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/K8400/Dual-head/Configuration.h View File

@@ -231,7 +231,7 @@
231 231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
232 232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
233 233
  *    70 : the 100K thermistor found in the bq Hephestos 2
234
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
234
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
235 235
  *
236 236
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
237 237
  *                              (but gives greater accuracy and more stable PID)
@@ -545,6 +545,11 @@
545 545
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
546 546
 //
547 547
 
548
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
549
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
550
+// or (with LCD_BED_LEVELING) the LCD controller.
551
+//#define PROBE_MANUALLY
552
+
548 553
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
549 554
 // For example an inductive probe, or a setup that uses the nozzle to probe.
550 555
 // An inductive probe must be deactivated to go below
@@ -741,7 +746,6 @@
741 746
   #define FILAMENT_RUNOUT_SCRIPT "M600"
742 747
 #endif
743 748
 
744
-
745 749
 //===========================================================================
746 750
 //=============================== Bed Leveling ==============================
747 751
 //===========================================================================
@@ -877,14 +881,18 @@
877 881
 
878 882
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
879 883
 
880
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
881
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
884
+#endif // BED_LEVELING
882 885
 
883
-  #if ENABLED(MANUAL_BED_LEVELING)
884
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
885
-  #endif
886
+/**
887
+ * Use the LCD controller for bed leveling
888
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
889
+ */
890
+//#define LCD_BED_LEVELING
886 891
 
887
-#endif // BED_LEVELING
892
+#if ENABLED(LCD_BED_LEVELING)
893
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
894
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
895
+#endif
888 896
 
889 897
 /**
890 898
  * Commands to execute at the end of G29 probing.
@@ -1433,13 +1441,13 @@
1433 1441
 
1434 1442
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1435 1443
 // be used to mitigate the associated resolution loss. If enabled,
1436
-// some of the PWM cycles are stretched so on average the wanted
1444
+// some of the PWM cycles are stretched so on average the desired
1437 1445
 // duty cycle is attained.
1438 1446
 //#define SOFT_PWM_DITHER
1439 1447
 
1440 1448
 // Temperature status LEDs that display the hotend and bed temperature.
1441
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1442
-// Otherwise the RED led is on. There is 1C hysteresis.
1449
+// If all hotends, bed temperature, and target temperature are under 54C
1450
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1443 1451
 //#define TEMP_STAT_LEDS
1444 1452
 
1445 1453
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

@@ -231,7 +231,7 @@
231 231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
232 232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
233 233
  *    70 : the 100K thermistor found in the bq Hephestos 2
234
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
234
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
235 235
  *
236 236
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
237 237
  *                              (but gives greater accuracy and more stable PID)
@@ -545,6 +545,11 @@
545 545
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
546 546
 //
547 547
 
548
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
549
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
550
+// or (with LCD_BED_LEVELING) the LCD controller.
551
+//#define PROBE_MANUALLY
552
+
548 553
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
549 554
 // For example an inductive probe, or a setup that uses the nozzle to probe.
550 555
 // An inductive probe must be deactivated to go below
@@ -741,7 +746,6 @@
741 746
   #define FILAMENT_RUNOUT_SCRIPT "M600"
742 747
 #endif
743 748
 
744
-
745 749
 //===========================================================================
746 750
 //=============================== Bed Leveling ==============================
747 751
 //===========================================================================
@@ -877,14 +881,18 @@
877 881
 
878 882
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
879 883
 
880
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
881
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
884
+#endif // BED_LEVELING
882 885
 
883
-  #if ENABLED(MANUAL_BED_LEVELING)
884
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
885
-  #endif
886
+/**
887
+ * Use the LCD controller for bed leveling
888
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
889
+ */
890
+//#define LCD_BED_LEVELING
886 891
 
887
-#endif // BED_LEVELING
892
+#if ENABLED(LCD_BED_LEVELING)
893
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
894
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
895
+#endif
888 896
 
889 897
 /**
890 898
  * Commands to execute at the end of G29 probing.
@@ -1433,13 +1441,13 @@
1433 1441
 
1434 1442
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1435 1443
 // be used to mitigate the associated resolution loss. If enabled,
1436
-// some of the PWM cycles are stretched so on average the wanted
1444
+// some of the PWM cycles are stretched so on average the desired
1437 1445
 // duty cycle is attained.
1438 1446
 //#define SOFT_PWM_DITHER
1439 1447
 
1440 1448
 // Temperature status LEDs that display the hotend and bed temperature.
1441
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1442
-// Otherwise the RED led is on. There is 1C hysteresis.
1449
+// If all hotends, bed temperature, and target temperature are under 54C
1450
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1443 1451
 //#define TEMP_STAT_LEDS
1444 1452
 
1445 1453
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/RigidBot/Configuration.h View File

@@ -234,7 +234,7 @@
234 234
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
235 235
  *    66 : 4.7M High Temperature thermistor from Dyze Design
236 236
  *    70 : the 100K thermistor found in the bq Hephestos 2
237
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
237
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
238 238
  *
239 239
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
240 240
  *                              (but gives greater accuracy and more stable PID)
@@ -544,6 +544,11 @@
544 544
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
545 545
 //
546 546
 
547
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
548
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
549
+// or (with LCD_BED_LEVELING) the LCD controller.
550
+//#define PROBE_MANUALLY
551
+
547 552
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
548 553
 // For example an inductive probe, or a setup that uses the nozzle to probe.
549 554
 // An inductive probe must be deactivated to go below
@@ -740,7 +745,6 @@
740 745
   #define FILAMENT_RUNOUT_SCRIPT "M600"
741 746
 #endif
742 747
 
743
-
744 748
 //===========================================================================
745 749
 //=============================== Bed Leveling ==============================
746 750
 //===========================================================================
@@ -876,14 +880,18 @@
876 880
 
877 881
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
878 882
 
879
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
880
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
883
+#endif // BED_LEVELING
881 884
 
882
-  #if ENABLED(MANUAL_BED_LEVELING)
883
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
884
-  #endif
885
+/**
886
+ * Use the LCD controller for bed leveling
887
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
888
+ */
889
+//#define LCD_BED_LEVELING
885 890
 
886
-#endif // BED_LEVELING
891
+#if ENABLED(LCD_BED_LEVELING)
892
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
893
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
894
+#endif
887 895
 
888 896
 /**
889 897
  * Commands to execute at the end of G29 probing.
@@ -1434,13 +1442,13 @@
1434 1442
 
1435 1443
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1436 1444
 // be used to mitigate the associated resolution loss. If enabled,
1437
-// some of the PWM cycles are stretched so on average the wanted
1445
+// some of the PWM cycles are stretched so on average the desired
1438 1446
 // duty cycle is attained.
1439 1447
 //#define SOFT_PWM_DITHER
1440 1448
 
1441 1449
 // Temperature status LEDs that display the hotend and bed temperature.
1442
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1443
-// Otherwise the RED led is on. There is 1C hysteresis.
1450
+// If all hotends, bed temperature, and target temperature are under 54C
1451
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1444 1452
 //#define TEMP_STAT_LEDS
1445 1453
 
1446 1454
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -263,7 +263,7 @@
263 263
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
264 264
  *    66 : 4.7M High Temperature thermistor from Dyze Design
265 265
  *    70 : the 100K thermistor found in the bq Hephestos 2
266
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
266
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
267 267
  *
268 268
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
269 269
  *                              (but gives greater accuracy and more stable PID)
@@ -560,6 +560,11 @@
560 560
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
561 561
 //
562 562
 
563
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
564
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
565
+// or (with LCD_BED_LEVELING) the LCD controller.
566
+//#define PROBE_MANUALLY
567
+
563 568
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
564 569
 // For example an inductive probe, or a setup that uses the nozzle to probe.
565 570
 // An inductive probe must be deactivated to go below
@@ -756,7 +761,6 @@
756 761
   #define FILAMENT_RUNOUT_SCRIPT "M600"
757 762
 #endif
758 763
 
759
-
760 764
 //===========================================================================
761 765
 //=============================== Bed Leveling ==============================
762 766
 //===========================================================================
@@ -892,14 +896,18 @@
892 896
 
893 897
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
894 898
 
895
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
896
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
899
+#endif // BED_LEVELING
897 900
 
898
-  #if ENABLED(MANUAL_BED_LEVELING)
899
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
900
-  #endif
901
+/**
902
+ * Use the LCD controller for bed leveling
903
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
904
+ */
905
+//#define LCD_BED_LEVELING
901 906
 
902
-#endif // BED_LEVELING
907
+#if ENABLED(LCD_BED_LEVELING)
908
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
909
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
910
+#endif
903 911
 
904 912
 /**
905 913
  * Commands to execute at the end of G29 probing.
@@ -1448,13 +1456,13 @@
1448 1456
 
1449 1457
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1450 1458
 // be used to mitigate the associated resolution loss. If enabled,
1451
-// some of the PWM cycles are stretched so on average the wanted
1459
+// some of the PWM cycles are stretched so on average the desired
1452 1460
 // duty cycle is attained.
1453 1461
 //#define SOFT_PWM_DITHER
1454 1462
 
1455 1463
 // Temperature status LEDs that display the hotend and bed temperature.
1456
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1457
-// Otherwise the RED led is on. There is 1C hysteresis.
1464
+// If all hotends, bed temperature, and target temperature are under 54C
1465
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1458 1466
 //#define TEMP_STAT_LEDS
1459 1467
 
1460 1468
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/TAZ4/Configuration.h View File

@@ -231,7 +231,7 @@
231 231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
232 232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
233 233
  *    70 : the 100K thermistor found in the bq Hephestos 2
234
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
234
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
235 235
  *
236 236
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
237 237
  *                              (but gives greater accuracy and more stable PID)
@@ -566,6 +566,11 @@
566 566
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
567 567
 //
568 568
 
569
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
570
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
571
+// or (with LCD_BED_LEVELING) the LCD controller.
572
+//#define PROBE_MANUALLY
573
+
569 574
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
570 575
 // For example an inductive probe, or a setup that uses the nozzle to probe.
571 576
 // An inductive probe must be deactivated to go below
@@ -762,7 +767,6 @@
762 767
   #define FILAMENT_RUNOUT_SCRIPT "M600"
763 768
 #endif
764 769
 
765
-
766 770
 //===========================================================================
767 771
 //=============================== Bed Leveling ==============================
768 772
 //===========================================================================
@@ -898,14 +902,18 @@
898 902
 
899 903
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
900 904
 
901
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
902
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
905
+#endif // BED_LEVELING
903 906
 
904
-  #if ENABLED(MANUAL_BED_LEVELING)
905
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
906
-  #endif
907
+/**
908
+ * Use the LCD controller for bed leveling
909
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
910
+ */
911
+//#define LCD_BED_LEVELING
907 912
 
908
-#endif // BED_LEVELING
913
+#if ENABLED(LCD_BED_LEVELING)
914
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
915
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
916
+#endif
909 917
 
910 918
 /**
911 919
  * Commands to execute at the end of G29 probing.
@@ -1454,13 +1462,13 @@
1454 1462
 
1455 1463
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1456 1464
 // be used to mitigate the associated resolution loss. If enabled,
1457
-// some of the PWM cycles are stretched so on average the wanted
1465
+// some of the PWM cycles are stretched so on average the desired
1458 1466
 // duty cycle is attained.
1459 1467
 //#define SOFT_PWM_DITHER
1460 1468
 
1461 1469
 // Temperature status LEDs that display the hotend and bed temperature.
1462
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1463
-// Otherwise the RED led is on. There is 1C hysteresis.
1470
+// If all hotends, bed temperature, and target temperature are under 54C
1471
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1464 1472
 //#define TEMP_STAT_LEDS
1465 1473
 
1466 1474
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -234,7 +234,7 @@
234 234
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
235 235
  *    66 : 4.7M High Temperature thermistor from Dyze Design
236 236
  *    70 : the 100K thermistor found in the bq Hephestos 2
237
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
237
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
238 238
  *
239 239
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
240 240
  *                              (but gives greater accuracy and more stable PID)
@@ -537,6 +537,11 @@
537 537
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
538 538
 //
539 539
 
540
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
541
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
542
+// or (with LCD_BED_LEVELING) the LCD controller.
543
+//#define PROBE_MANUALLY
544
+
540 545
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
541 546
 // For example an inductive probe, or a setup that uses the nozzle to probe.
542 547
 // An inductive probe must be deactivated to go below
@@ -733,7 +738,6 @@
733 738
   #define FILAMENT_RUNOUT_SCRIPT "M600"
734 739
 #endif
735 740
 
736
-
737 741
 //===========================================================================
738 742
 //=============================== Bed Leveling ==============================
739 743
 //===========================================================================
@@ -869,14 +873,18 @@
869 873
 
870 874
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
871 875
 
872
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
873
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
876
+#endif // BED_LEVELING
874 877
 
875
-  #if ENABLED(MANUAL_BED_LEVELING)
876
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
877
-  #endif
878
+/**
879
+ * Use the LCD controller for bed leveling
880
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
881
+ */
882
+//#define LCD_BED_LEVELING
878 883
 
879
-#endif // BED_LEVELING
884
+#if ENABLED(LCD_BED_LEVELING)
885
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
886
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
887
+#endif
880 888
 
881 889
 /**
882 890
  * Commands to execute at the end of G29 probing.
@@ -1425,13 +1433,13 @@
1425 1433
 
1426 1434
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1427 1435
 // be used to mitigate the associated resolution loss. If enabled,
1428
-// some of the PWM cycles are stretched so on average the wanted
1436
+// some of the PWM cycles are stretched so on average the desired
1429 1437
 // duty cycle is attained.
1430 1438
 //#define SOFT_PWM_DITHER
1431 1439
 
1432 1440
 // Temperature status LEDs that display the hotend and bed temperature.
1433
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1434
-// Otherwise the RED led is on. There is 1C hysteresis.
1441
+// If all hotends, bed temperature, and target temperature are under 54C
1442
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1435 1443
 //#define TEMP_STAT_LEDS
1436 1444
 
1437 1445
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

@@ -231,7 +231,7 @@
231 231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
232 232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
233 233
  *    70 : the 100K thermistor found in the bq Hephestos 2
234
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
234
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
235 235
  *
236 236
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
237 237
  *                              (but gives greater accuracy and more stable PID)
@@ -545,6 +545,11 @@
545 545
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
546 546
 //
547 547
 
548
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
549
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
550
+// or (with LCD_BED_LEVELING) the LCD controller.
551
+//#define PROBE_MANUALLY
552
+
548 553
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
549 554
 // For example an inductive probe, or a setup that uses the nozzle to probe.
550 555
 // An inductive probe must be deactivated to go below
@@ -741,7 +746,6 @@
741 746
   #define FILAMENT_RUNOUT_SCRIPT "M600"
742 747
 #endif
743 748
 
744
-
745 749
 //===========================================================================
746 750
 //=============================== Bed Leveling ==============================
747 751
 //===========================================================================
@@ -877,14 +881,18 @@
877 881
 
878 882
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
879 883
 
880
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
881
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
884
+#endif // BED_LEVELING
882 885
 
883
-  #if ENABLED(MANUAL_BED_LEVELING)
884
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
885
-  #endif
886
+/**
887
+ * Use the LCD controller for bed leveling
888
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
889
+ */
890
+//#define LCD_BED_LEVELING
886 891
 
887
-#endif // BED_LEVELING
892
+#if ENABLED(LCD_BED_LEVELING)
893
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
894
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
895
+#endif
888 896
 
889 897
 /**
890 898
  * Commands to execute at the end of G29 probing.
@@ -1433,13 +1441,13 @@
1433 1441
 
1434 1442
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1435 1443
 // be used to mitigate the associated resolution loss. If enabled,
1436
-// some of the PWM cycles are stretched so on average the wanted
1444
+// some of the PWM cycles are stretched so on average the desired
1437 1445
 // duty cycle is attained.
1438 1446
 //#define SOFT_PWM_DITHER
1439 1447
 
1440 1448
 // Temperature status LEDs that display the hotend and bed temperature.
1441
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1442
-// Otherwise the RED led is on. There is 1C hysteresis.
1449
+// If all hotends, bed temperature, and target temperature are under 54C
1450
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1443 1451
 //#define TEMP_STAT_LEDS
1444 1452
 
1445 1453
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 10
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h View File

@@ -231,7 +231,7 @@
231 231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
232 232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
233 233
  *    70 : the 100K thermistor found in the bq Hephestos 2
234
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
234
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
235 235
  *
236 236
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
237 237
  *                              (but gives greater accuracy and more stable PID)
@@ -603,6 +603,11 @@
603 603
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
604 604
 //
605 605
 
606
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
607
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
608
+// or (with LCD_BED_LEVELING) the LCD controller.
609
+//#define PROBE_MANUALLY
610
+
606 611
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
607 612
 // For example an inductive probe, or a setup that uses the nozzle to probe.
608 613
 // An inductive probe must be deactivated to go below
@@ -982,14 +987,18 @@
982 987
 
983 988
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
984 989
 
985
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
986
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
990
+#endif // BED_LEVELING
987 991
 
988
-  #if ENABLED(MANUAL_BED_LEVELING)
989
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
990
-  #endif
992
+/**
993
+ * Use the LCD controller for bed leveling
994
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
995
+ */
996
+//#define LCD_BED_LEVELING
991 997
 
992
-#endif // BED_LEVELING
998
+#if ENABLED(LCD_BED_LEVELING)
999
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
1000
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
1001
+#endif
993 1002
 
994 1003
 /**
995 1004
  * Commands to execute at the end of G29 probing.
@@ -1538,13 +1547,13 @@
1538 1547
 
1539 1548
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1540 1549
 // be used to mitigate the associated resolution loss. If enabled,
1541
-// some of the PWM cycles are stretched so on average the wanted
1550
+// some of the PWM cycles are stretched so on average the desired
1542 1551
 // duty cycle is attained.
1543 1552
 //#define SOFT_PWM_DITHER
1544 1553
 
1545 1554
 // Temperature status LEDs that display the hotend and bed temperature.
1546
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1547
-// Otherwise the RED led is on. There is 1C hysteresis.
1555
+// If all hotends, bed temperature, and target temperature are under 54C
1556
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1548 1557
 //#define TEMP_STAT_LEDS
1549 1558
 
1550 1559
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -231,7 +231,7 @@
231 231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
232 232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
233 233
  *    70 : the 100K thermistor found in the bq Hephestos 2
234
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
234
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
235 235
  *
236 236
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
237 237
  *                              (but gives greater accuracy and more stable PID)
@@ -590,6 +590,11 @@
590 590
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
591 591
 //
592 592
 
593
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
594
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
595
+// or (with LCD_BED_LEVELING) the LCD controller.
596
+//#define PROBE_MANUALLY
597
+
593 598
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
594 599
 // For example an inductive probe, or a setup that uses the nozzle to probe.
595 600
 // An inductive probe must be deactivated to go below
@@ -831,7 +836,6 @@
831 836
   #define FILAMENT_RUNOUT_SCRIPT "M600"
832 837
 #endif
833 838
 
834
-
835 839
 //===========================================================================
836 840
 //=============================== Bed Leveling ==============================
837 841
 //===========================================================================
@@ -968,14 +972,18 @@
968 972
 
969 973
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
970 974
 
971
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
972
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
975
+#endif // BED_LEVELING
973 976
 
974
-  #if ENABLED(MANUAL_BED_LEVELING)
975
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
976
-  #endif
977
+/**
978
+ * Use the LCD controller for bed leveling
979
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
980
+ */
981
+//#define LCD_BED_LEVELING
977 982
 
978
-#endif // BED_LEVELING
983
+#if ENABLED(LCD_BED_LEVELING)
984
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
985
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
986
+#endif
979 987
 
980 988
 /**
981 989
  * Commands to execute at the end of G29 probing.
@@ -1523,13 +1531,13 @@
1523 1531
 
1524 1532
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1525 1533
 // be used to mitigate the associated resolution loss. If enabled,
1526
-// some of the PWM cycles are stretched so on average the wanted
1534
+// some of the PWM cycles are stretched so on average the desired
1527 1535
 // duty cycle is attained.
1528 1536
 //#define SOFT_PWM_DITHER
1529 1537
 
1530 1538
 // Temperature status LEDs that display the hotend and bed temperature.
1531
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1532
-// Otherwise the RED led is on. There is 1C hysteresis.
1539
+// If all hotends, bed temperature, and target temperature are under 54C
1540
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1533 1541
 //#define TEMP_STAT_LEDS
1534 1542
 
1535 1543
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -231,7 +231,7 @@
231 231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
232 232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
233 233
  *    70 : the 100K thermistor found in the bq Hephestos 2
234
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
234
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
235 235
  *
236 236
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
237 237
  *                              (but gives greater accuracy and more stable PID)
@@ -590,6 +590,11 @@
590 590
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
591 591
 //
592 592
 
593
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
594
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
595
+// or (with LCD_BED_LEVELING) the LCD controller.
596
+//#define PROBE_MANUALLY
597
+
593 598
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
594 599
 // For example an inductive probe, or a setup that uses the nozzle to probe.
595 600
 // An inductive probe must be deactivated to go below
@@ -834,7 +839,6 @@
834 839
   #define FILAMENT_RUNOUT_SCRIPT "M600"
835 840
 #endif
836 841
 
837
-
838 842
 //===========================================================================
839 843
 //=============================== Bed Leveling ==============================
840 844
 //===========================================================================
@@ -972,14 +976,18 @@
972 976
 
973 977
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
974 978
 
975
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
976
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
979
+#endif // BED_LEVELING
977 980
 
978
-  #if ENABLED(MANUAL_BED_LEVELING)
979
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
980
-  #endif
981
+/**
982
+ * Use the LCD controller for bed leveling
983
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
984
+ */
985
+//#define LCD_BED_LEVELING
981 986
 
982
-#endif // BED_LEVELING
987
+#if ENABLED(LCD_BED_LEVELING)
988
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
989
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
990
+#endif
983 991
 
984 992
 /**
985 993
  * Commands to execute at the end of G29 probing.
@@ -1527,13 +1535,13 @@
1527 1535
 
1528 1536
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1529 1537
 // be used to mitigate the associated resolution loss. If enabled,
1530
-// some of the PWM cycles are stretched so on average the wanted
1538
+// some of the PWM cycles are stretched so on average the desired
1531 1539
 // duty cycle is attained.
1532 1540
 //#define SOFT_PWM_DITHER
1533 1541
 
1534 1542
 // Temperature status LEDs that display the hotend and bed temperature.
1535
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1536
-// Otherwise the RED led is on. There is 1C hysteresis.
1543
+// If all hotends, bed temperature, and target temperature are under 54C
1544
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1537 1545
 //#define TEMP_STAT_LEDS
1538 1546
 
1539 1547
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

@@ -235,7 +235,7 @@
235 235
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
236 236
  *    66 : 4.7M High Temperature thermistor from Dyze Design
237 237
  *    70 : the 100K thermistor found in the bq Hephestos 2
238
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
238
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
239 239
  *
240 240
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
241 241
  *                              (but gives greater accuracy and more stable PID)
@@ -584,6 +584,11 @@
584 584
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
585 585
 //
586 586
 
587
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
588
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
589
+// or (with LCD_BED_LEVELING) the LCD controller.
590
+//#define PROBE_MANUALLY
591
+
587 592
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
588 593
 // For example an inductive probe, or a setup that uses the nozzle to probe.
589 594
 // An inductive probe must be deactivated to go below
@@ -833,7 +838,6 @@
833 838
   #define FILAMENT_RUNOUT_SCRIPT "M600"
834 839
 #endif
835 840
 
836
-
837 841
 //===========================================================================
838 842
 //=============================== Bed Leveling ==============================
839 843
 //===========================================================================
@@ -971,14 +975,18 @@
971 975
 
972 976
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
973 977
 
974
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
975
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
978
+#endif // BED_LEVELING
976 979
 
977
-  #if ENABLED(MANUAL_BED_LEVELING)
978
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
979
-  #endif
980
+/**
981
+ * Use the LCD controller for bed leveling
982
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
983
+ */
984
+//#define LCD_BED_LEVELING
980 985
 
981
-#endif // BED_LEVELING
986
+#if ENABLED(LCD_BED_LEVELING)
987
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
988
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
989
+#endif
982 990
 
983 991
 /**
984 992
  * Commands to execute at the end of G29 probing.
@@ -1526,13 +1534,13 @@
1526 1534
 
1527 1535
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1528 1536
 // be used to mitigate the associated resolution loss. If enabled,
1529
-// some of the PWM cycles are stretched so on average the wanted
1537
+// some of the PWM cycles are stretched so on average the desired
1530 1538
 // duty cycle is attained.
1531 1539
 //#define SOFT_PWM_DITHER
1532 1540
 
1533 1541
 // Temperature status LEDs that display the hotend and bed temperature.
1534
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1535
-// Otherwise the RED led is on. There is 1C hysteresis.
1542
+// If all hotends, bed temperature, and target temperature are under 54C
1543
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1536 1544
 //#define TEMP_STAT_LEDS
1537 1545
 
1538 1546
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

@@ -231,7 +231,7 @@
231 231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
232 232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
233 233
  *    70 : the 100K thermistor found in the bq Hephestos 2
234
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
234
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
235 235
  *
236 236
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
237 237
  *                              (but gives greater accuracy and more stable PID)
@@ -603,6 +603,11 @@
603 603
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
604 604
 //
605 605
 
606
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
607
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
608
+// or (with LCD_BED_LEVELING) the LCD controller.
609
+//#define PROBE_MANUALLY
610
+
606 611
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
607 612
 // For example an inductive probe, or a setup that uses the nozzle to probe.
608 613
 // An inductive probe must be deactivated to go below
@@ -844,7 +849,6 @@
844 849
   #define FILAMENT_RUNOUT_SCRIPT "M600"
845 850
 #endif
846 851
 
847
-
848 852
 //===========================================================================
849 853
 //=============================== Bed Leveling ==============================
850 854
 //===========================================================================
@@ -981,14 +985,18 @@
981 985
 
982 986
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
983 987
 
984
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
985
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
988
+#endif // BED_LEVELING
986 989
 
987
-  #if ENABLED(MANUAL_BED_LEVELING)
988
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
989
-  #endif
990
+/**
991
+ * Use the LCD controller for bed leveling
992
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
993
+ */
994
+//#define LCD_BED_LEVELING
990 995
 
991
-#endif // BED_LEVELING
996
+#if ENABLED(LCD_BED_LEVELING)
997
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
998
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
999
+#endif
992 1000
 
993 1001
 /**
994 1002
  * Commands to execute at the end of G29 probing.
@@ -1536,13 +1544,13 @@
1536 1544
 
1537 1545
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1538 1546
 // be used to mitigate the associated resolution loss. If enabled,
1539
-// some of the PWM cycles are stretched so on average the wanted
1547
+// some of the PWM cycles are stretched so on average the desired
1540 1548
 // duty cycle is attained.
1541 1549
 //#define SOFT_PWM_DITHER
1542 1550
 
1543 1551
 // Temperature status LEDs that display the hotend and bed temperature.
1544
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1545
-// Otherwise the RED led is on. There is 1C hysteresis.
1552
+// If all hotends, bed temperature, and target temperature are under 54C
1553
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1546 1554
 //#define TEMP_STAT_LEDS
1547 1555
 
1548 1556
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/makibox/Configuration.h View File

@@ -231,7 +231,7 @@
231 231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
232 232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
233 233
  *    70 : the 100K thermistor found in the bq Hephestos 2
234
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
234
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
235 235
  *
236 236
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
237 237
  *                              (but gives greater accuracy and more stable PID)
@@ -548,6 +548,11 @@
548 548
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
549 549
 //
550 550
 
551
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
552
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
553
+// or (with LCD_BED_LEVELING) the LCD controller.
554
+//#define PROBE_MANUALLY
555
+
551 556
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
552 557
 // For example an inductive probe, or a setup that uses the nozzle to probe.
553 558
 // An inductive probe must be deactivated to go below
@@ -744,7 +749,6 @@
744 749
   #define FILAMENT_RUNOUT_SCRIPT "M600"
745 750
 #endif
746 751
 
747
-
748 752
 //===========================================================================
749 753
 //=============================== Bed Leveling ==============================
750 754
 //===========================================================================
@@ -880,14 +884,18 @@
880 884
 
881 885
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
882 886
 
883
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
884
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
887
+#endif // BED_LEVELING
885 888
 
886
-  #if ENABLED(MANUAL_BED_LEVELING)
887
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
888
-  #endif
889
+/**
890
+ * Use the LCD controller for bed leveling
891
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
892
+ */
893
+//#define LCD_BED_LEVELING
889 894
 
890
-#endif // BED_LEVELING
895
+#if ENABLED(LCD_BED_LEVELING)
896
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
897
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
898
+#endif
891 899
 
892 900
 /**
893 901
  * Commands to execute at the end of G29 probing.
@@ -1436,13 +1444,13 @@
1436 1444
 
1437 1445
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1438 1446
 // be used to mitigate the associated resolution loss. If enabled,
1439
-// some of the PWM cycles are stretched so on average the wanted
1447
+// some of the PWM cycles are stretched so on average the desired
1440 1448
 // duty cycle is attained.
1441 1449
 //#define SOFT_PWM_DITHER
1442 1450
 
1443 1451
 // Temperature status LEDs that display the hotend and bed temperature.
1444
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1445
-// Otherwise the RED led is on. There is 1C hysteresis.
1452
+// If all hotends, bed temperature, and target temperature are under 54C
1453
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1446 1454
 //#define TEMP_STAT_LEDS
1447 1455
 
1448 1456
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 19
- 11
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -231,7 +231,7 @@
231 231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
232 232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
233 233
  *    70 : the 100K thermistor found in the bq Hephestos 2
234
- *    75 : 100k Generic Silicon Heat Pad typically a NTC 100K MGB18-104F39050L32 thermistor
234
+ *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
235 235
  *
236 236
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
237 237
  *                              (but gives greater accuracy and more stable PID)
@@ -541,6 +541,11 @@
541 541
 // Use M851 to set the Z probe vertical offset from the nozzle. Store with M500.
542 542
 //
543 543
 
544
+// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
545
+// Use G29 repeatedly, adjusting the Z height at each point with movement commands
546
+// or (with LCD_BED_LEVELING) the LCD controller.
547
+//#define PROBE_MANUALLY
548
+
544 549
 // A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
545 550
 // For example an inductive probe, or a setup that uses the nozzle to probe.
546 551
 // An inductive probe must be deactivated to go below
@@ -737,7 +742,6 @@
737 742
   #define FILAMENT_RUNOUT_SCRIPT "M600"
738 743
 #endif
739 744
 
740
-
741 745
 //===========================================================================
742 746
 //=============================== Bed Leveling ==============================
743 747
 //===========================================================================
@@ -873,14 +877,18 @@
873 877
 
874 878
   //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
875 879
 
876
-  //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
877
-  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
880
+#endif // BED_LEVELING
878 881
 
879
-  #if ENABLED(MANUAL_BED_LEVELING)
880
-    #define MBL_Z_STEP 0.025     // Step size while manually probing Z axis.
881
-  #endif
882
+/**
883
+ * Use the LCD controller for bed leveling
884
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
885
+ */
886
+//#define LCD_BED_LEVELING
882 887
 
883
-#endif // BED_LEVELING
888
+#if ENABLED(LCD_BED_LEVELING)
889
+  #define MBL_Z_STEP 0.025    // Step size while manually probing Z axis.
890
+  #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
891
+#endif
884 892
 
885 893
 /**
886 894
  * Commands to execute at the end of G29 probing.
@@ -1429,13 +1437,13 @@
1429 1437
 
1430 1438
 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
1431 1439
 // be used to mitigate the associated resolution loss. If enabled,
1432
-// some of the PWM cycles are stretched so on average the wanted
1440
+// some of the PWM cycles are stretched so on average the desired
1433 1441
 // duty cycle is attained.
1434 1442
 //#define SOFT_PWM_DITHER
1435 1443
 
1436 1444
 // Temperature status LEDs that display the hotend and bed temperature.
1437
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
1438
-// Otherwise the RED led is on. There is 1C hysteresis.
1445
+// If all hotends, bed temperature, and target temperature are under 54C
1446
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1439 1447
 //#define TEMP_STAT_LEDS
1440 1448
 
1441 1449
 // M240  Triggers a camera by emulating a Canon RC-1 Remote

+ 175
- 67
Marlin/ultralcd.cpp View File

@@ -181,7 +181,7 @@ uint16_t max_display_update_time = 0;
181 181
     void lcd_delta_calibrate_menu();
182 182
   #endif
183 183
 
184
-  #if ENABLED(MANUAL_BED_LEVELING)
184
+  #if ENABLED(MESH_BED_LEVELING) && ENABLED(LCD_BED_LEVELING)
185 185
     #include "mesh_bed_leveling.h"
186 186
   #endif
187 187
 
@@ -457,13 +457,18 @@ uint16_t max_display_update_time = 0;
457 457
    * Synchronize safely while holding the current screen
458 458
    * This blocks all further screen or stripe updates once called
459 459
    */
460
+  extern uint8_t commands_in_queue;
461
+
460 462
   inline void lcd_synchronize() {
461 463
     lcd_implementation_drawmenu_static(LCD_HEIGHT >= 4 ? 1 : 0, PSTR(MSG_MOVING));
462 464
     if (no_reentrance) return;
463 465
     no_reentrance = true;
464 466
     screenFunc_t old_screen = currentScreen;
465 467
     lcd_goto_screen(lcd_synchronize);
466
-    stepper.synchronize();
468
+    while (commands_in_queue) {
469
+      idle();
470
+      stepper.synchronize();
471
+    }
467 472
     no_reentrance = false;
468 473
     lcd_goto_screen(old_screen);
469 474
   }
@@ -982,7 +987,7 @@ void kill_screen(const char* lcd_msg) {
982 987
     MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_percentage, 10, 999);
983 988
 
984 989
     // Manual bed leveling, Bed Z:
985
-    #if ENABLED(MANUAL_BED_LEVELING)
990
+    #if ENABLED(MESH_BED_LEVELING) && ENABLED(LCD_BED_LEVELING)
986 991
       MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1);
987 992
     #endif
988 993
 
@@ -1321,34 +1326,57 @@ void kill_screen(const char* lcd_msg) {
1321 1326
 
1322 1327
   #endif
1323 1328
 
1324
-  #if ENABLED(MANUAL_BED_LEVELING)
1329
+  #if ENABLED(LCD_BED_LEVELING)
1325 1330
 
1326 1331
     /**
1327 1332
      *
1328
-     * "Prepare" > "Bed Leveling" handlers
1333
+     * "Prepare" > "Level Bed" handlers
1329 1334
      *
1330 1335
      */
1331 1336
 
1332 1337
     static uint8_t manual_probe_index;
1333 1338
 
1334
-    // Utility to go to the next mesh point
1335
-    inline void _manual_probe_xy(float x, float y) {
1336
-      if (no_reentrance) return;
1337
-      #if MANUAL_PROBE_HEIGHT > 0
1338
-        current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT;
1339
-        line_to_current(Z_AXIS);
1340
-      #endif
1341
-      current_position[X_AXIS] = LOGICAL_X_POSITION(x);
1342
-      current_position[Y_AXIS] = LOGICAL_Y_POSITION(y);
1343
-      planner.buffer_line_kinematic(current_position, MMM_TO_MMS(XY_PROBE_SPEED), active_extruder);
1344
-      #if MANUAL_PROBE_HEIGHT > 0
1345
-        current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + 0.2;
1346
-        line_to_current(Z_AXIS);
1339
+    #if ENABLED(PROBE_MANUALLY)
1340
+      extern bool g29_in_progress;
1341
+    #endif
1342
+
1343
+    // LCD probed points are from defaults
1344
+    constexpr uint8_t total_probe_points =
1345
+      #if ABL_GRID
1346
+        (ABL_GRID_MAX_POINTS_X) * (ABL_GRID_MAX_POINTS_Y)
1347
+      #elif ENABLED(AUTO_BED_LEVELING_3POINT)
1348
+        int(3)
1349
+      #elif ENABLED(AUTO_BED_LEVELING_UBL)
1350
+        (UBL_MESH_NUM_X_POINTS) * (UBL_MESH_NUM_Y_POINTS)
1351
+      #elif ENABLED(MESH_BED_LEVELING)
1352
+        (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS)
1347 1353
       #endif
1348
-      lcd_synchronize();
1349
-    }
1354
+    ;
1355
+
1356
+    #if ENABLED(MESH_BED_LEVELING)
1357
+
1358
+      // Utility to go to the next mesh point
1359
+      inline void _manual_probe_goto_xy(float x, float y) {
1360
+        if (no_reentrance) return;
1361
+        #if MANUAL_PROBE_HEIGHT > 0
1362
+          current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT;
1363
+          line_to_current(Z_AXIS);
1364
+        #endif
1365
+        current_position[X_AXIS] = LOGICAL_X_POSITION(x);
1366
+        current_position[Y_AXIS] = LOGICAL_Y_POSITION(y);
1367
+        planner.buffer_line_kinematic(current_position, MMM_TO_MMS(XY_PROBE_SPEED), active_extruder);
1368
+        #if MANUAL_PROBE_HEIGHT > 0
1369
+          current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + 0.2;
1370
+          line_to_current(Z_AXIS);
1371
+        #endif
1372
+        lcd_synchronize();
1373
+      }
1374
+
1375
+    #endif // MESH_BED_LEVELING
1350 1376
 
1351
-    void _lcd_level_goto_next_point();
1377
+    #if ENABLED(MESH_BED_LEVELING) || ENABLED(PROBE_MANUALLY)
1378
+      void _lcd_level_goto_next_point();
1379
+    #endif
1352 1380
 
1353 1381
     void _lcd_level_bed_done() {
1354 1382
       if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_DONE));
@@ -1356,7 +1384,19 @@ void kill_screen(const char* lcd_msg) {
1356 1384
     }
1357 1385
 
1358 1386
     /**
1359
-     * Step 7: Get the Z coordinate, then goto next point or exit
1387
+     * Step 6: Display "Next point: 1 / 9" while waiting for move to finish
1388
+     */
1389
+    void _lcd_level_bed_moving() {
1390
+      if (lcdDrawUpdate) {
1391
+        char msg[10];
1392
+        sprintf_P(msg, PSTR("%i / %u"), (int)(manual_probe_index + 1), total_probe_points);
1393
+        lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_NEXT_POINT), msg);
1394
+      }
1395
+      lcdDrawUpdate = LCDVIEW_KEEP_REDRAWING;
1396
+    }
1397
+
1398
+    /**
1399
+     * Step 7: Get the Z coordinate, click goes to the next point or exits
1360 1400
      */
1361 1401
     void _lcd_level_bed_get_z() {
1362 1402
       ENCODER_DIRECTION_NORMAL();
@@ -1367,78 +1407,130 @@ void kill_screen(const char* lcd_msg) {
1367 1407
       if (encoderPosition) {
1368 1408
         refresh_cmd_timeout();
1369 1409
         current_position[Z_AXIS] += float((int32_t)encoderPosition) * (MBL_Z_STEP);
1370
-        NOLESS(current_position[Z_AXIS], -(MANUAL_PROBE_Z_RANGE) * 0.5);
1371
-        NOMORE(current_position[Z_AXIS], (MANUAL_PROBE_Z_RANGE) * 0.5);
1410
+        NOLESS(current_position[Z_AXIS], -(LCD_PROBE_Z_RANGE) * 0.5);
1411
+        NOMORE(current_position[Z_AXIS],  (LCD_PROBE_Z_RANGE) * 0.5);
1372 1412
         line_to_current(Z_AXIS);
1373 1413
         lcdDrawUpdate = LCDVIEW_KEEP_REDRAWING;
1374 1414
         encoderPosition = 0;
1375 1415
       }
1376 1416
 
1377 1417
       if (lcd_clicked) {
1378
-        mbl.set_zigzag_z(manual_probe_index++, current_position[Z_AXIS]);
1379
-        if (manual_probe_index == (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS)) {
1418
+
1419
+        // Use a hook to set the probe point z
1420
+        // (zigzag arranges in XY order)
1421
+        #if ENABLED(AUTO_BED_LEVELING_UBL)
1422
+
1423
+          // UBL set-z handling goes here
1424
+
1425
+        #elif ENABLED(PROBE_MANUALLY)
1426
+
1427
+          // G29 helpfully records Z and goes to the next
1428
+          // point (or beeps if done)
1429
+          enqueue_and_echo_commands_P(PSTR("G29"));
1430
+          manual_probe_index++;
1431
+
1432
+        #elif ENABLED(MESH_BED_LEVELING)
1433
+
1434
+          mbl.set_zigzag_z(manual_probe_index++, current_position[Z_AXIS]);
1435
+
1436
+        #endif
1437
+
1438
+        // If done...
1439
+        if (manual_probe_index == total_probe_points) {
1440
+
1441
+          // Say "Done!"
1380 1442
           lcd_goto_screen(_lcd_level_bed_done);
1381 1443
 
1444
+          // Raise Z to the "manual probe height"
1382 1445
           #if MANUAL_PROBE_HEIGHT > 0
1383 1446
             current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT;
1384 1447
             line_to_current(Z_AXIS);
1385 1448
             lcd_synchronize();
1386 1449
           #endif
1387 1450
 
1388
-          mbl.set_has_mesh(true);
1389
-          mbl.set_reactivate(true);
1390
-          enqueue_and_echo_commands_P(PSTR("G28"));
1451
+          // Enable leveling, if needed
1452
+          #if ENABLED(MESH_BED_LEVELING)
1453
+
1454
+            mbl.set_has_mesh(true);
1455
+            mbl.set_reactivate(true);
1456
+            enqueue_and_echo_commands_P(PSTR("G28"));
1457
+
1458
+          #elif ENABLED(AUTO_BED_LEVELING_UBL)
1459
+
1460
+            // UBL enable goes here
1461
+
1462
+          #elif ENABLED(PROBE_MANUALLY)
1463
+
1464
+            // ABL will be enabled due to "G29".
1465
+
1466
+          #endif
1467
+
1391 1468
           lcd_return_to_status();
1392 1469
           //LCD_MESSAGEPGM(MSG_LEVEL_BED_DONE);
1393 1470
           lcd_completion_feedback();
1394 1471
         }
1395 1472
         else {
1396
-          lcd_goto_screen(_lcd_level_goto_next_point);
1473
+
1474
+          // Move to the next probe point, if needed
1475
+          #if ENABLED(MESH_BED_LEVELING) || ENABLED(PROBE_MANUALLY)
1476
+
1477
+            _lcd_level_goto_next_point();
1478
+
1479
+          #elif ENABLED(AUTO_BED_LEVELING_UBL)
1480
+
1481
+            // UBL goto-next-point goes here
1482
+
1483
+          #endif
1397 1484
         }
1398 1485
       }
1399 1486
 
1400
-KeepDrawing:
1487
+      KeepDrawing:
1488
+
1401 1489
       // Update on first display, then only on updates to Z position
1402 1490
       // Show message above on clicks instead
1403 1491
       if (lcdDrawUpdate) {
1404 1492
         const float v = current_position[Z_AXIS];
1405 1493
         lcd_implementation_drawedit(PSTR(MSG_MOVE_Z), ftostr43sign(v + (v < 0 ? -0.0001 : 0.0001), '+'));
1406 1494
       }
1407
-
1408 1495
     }
1409 1496
 
1410
-    /**
1411
-     * Step 6: Display "Next point: 1 / 9" while waiting for move to finish
1412
-     */
1413
-    void _lcd_level_bed_moving() {
1414
-      if (lcdDrawUpdate) {
1415
-        char msg[10];
1497
+    #if ENABLED(MESH_BED_LEVELING) || ENABLED(PROBE_MANUALLY)
1498
+
1499
+      /**
1500
+       * Step 5: Initiate a move to the next point
1501
+       */
1502
+      void _lcd_level_goto_next_point() {
1503
+
1504
+        // Set the menu to display ahead of blocking call
1505
+        lcd_goto_screen(_lcd_level_bed_moving);
1506
+
1416 1507
         #if ENABLED(MESH_BED_LEVELING)
1417
-          sprintf_P(msg, PSTR("%i / %u"), (int)(manual_probe_index + 1), (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS));
1508
+
1509
+          int8_t px, py;
1510
+          mbl.zigzag(manual_probe_index, px, py);
1511
+
1512
+          // Controls the loop until the move is done
1513
+          _manual_probe_goto_xy(
1514
+            LOGICAL_X_POSITION(mbl.index_to_xpos[px]),
1515
+            LOGICAL_Y_POSITION(mbl.index_to_ypos[py])
1516
+          );
1517
+
1418 1518
         #elif ENABLED(AUTO_BED_LEVELING_UBL)
1419
-          sprintf_P(msg, PSTR("%i / %u"), (int)(manual_probe_index + 1), (UBL_MESH_NUM_X_POINTS) * (UBL_MESH_NUM_Y_POINTS));
1420
-        #endif
1421
-        lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_NEXT_POINT), msg);
1422
-      }
1423 1519
 
1424
-      lcdDrawUpdate = LCDVIEW_KEEP_REDRAWING;
1425
-    }
1520
+          // UBL may have its own methodology
1426 1521
 
1427
-    /**
1428
-     * Step 5: Initiate a move to the next point
1429
-     */
1430
-    void _lcd_level_goto_next_point() {
1431
-      // Set the menu to display ahead of blocking call
1432
-      lcd_goto_screen(_lcd_level_bed_moving);
1522
+        #elif ENABLED(PROBE_MANUALLY)
1433 1523
 
1434
-      // _manual_probe_xy runs the menu loop until the move is done
1435
-      int8_t px, py;
1436
-      mbl.zigzag(manual_probe_index, px, py);
1437
-      _manual_probe_xy(mbl.index_to_xpos[px], mbl.index_to_ypos[py]);
1524
+          // Just wait for the G29 move to complete
1525
+          lcd_synchronize();
1438 1526
 
1439
-      // After the blocking function returns, change menus
1440
-      lcd_goto_screen(_lcd_level_bed_get_z);
1441
-    }
1527
+        #endif
1528
+
1529
+        // After the blocking function returns, change menus
1530
+        lcd_goto_screen(_lcd_level_bed_get_z);
1531
+      }
1532
+
1533
+    #endif // MESH_BED_LEVELING
1442 1534
 
1443 1535
     /**
1444 1536
      * Step 4: Display "Click to Begin", wait for click
@@ -1448,7 +1540,14 @@ KeepDrawing:
1448 1540
       if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_WAITING));
1449 1541
       if (lcd_clicked) {
1450 1542
         manual_probe_index = 0;
1451
-        lcd_goto_screen(_lcd_level_goto_next_point);
1543
+        #if ENABLED(MESH_BED_LEVELING)
1544
+          _lcd_level_goto_next_point();
1545
+        #elif ENABLED(AUTO_BED_LEVELING_UBL)
1546
+          // UBL click handling should go here
1547
+        #elif ENABLED(PROBE_MANUALLY)
1548
+          enqueue_and_echo_commands_P(PSTR("G29"));
1549
+          _lcd_level_goto_next_point();
1550
+        #endif
1452 1551
       }
1453 1552
     }
1454 1553
 
@@ -1466,15 +1565,17 @@ KeepDrawing:
1466 1565
      * Step 2: Continue Bed Leveling...
1467 1566
      */
1468 1567
     void _lcd_level_bed_continue() {
1568
+      #if PLANNER_LEVELING && DISABLED(AUTO_BED_LEVELING_UBL)
1569
+        reset_bed_level();
1570
+      #endif
1469 1571
       defer_return_to_status = true;
1470 1572
       axis_homed[X_AXIS] = axis_homed[Y_AXIS] = axis_homed[Z_AXIS] = false;
1471
-      mbl.reset();
1472
-      enqueue_and_echo_commands_P(PSTR("G28"));
1473 1573
       lcd_goto_screen(_lcd_level_bed_homing);
1574
+      enqueue_and_echo_commands_P(PSTR("G28"));
1474 1575
     }
1475 1576
 
1476 1577
     /**
1477
-     * Step 1: MBL entry-point: "Cancel" or "Level Bed"
1578
+     * Step 1: Bed Level entry-point: "Cancel" or "Level Bed"
1478 1579
      */
1479 1580
     void lcd_level_bed() {
1480 1581
       START_MENU();
@@ -1483,7 +1584,7 @@ KeepDrawing:
1483 1584
       END_MENU();
1484 1585
     }
1485 1586
 
1486
-  #endif  // MANUAL_BED_LEVELING
1587
+  #endif // LCD_BED_LEVELING
1487 1588
 
1488 1589
   /**
1489 1590
    *
@@ -1520,12 +1621,19 @@ KeepDrawing:
1520 1621
     //
1521 1622
     // Level Bed
1522 1623
     //
1523
-    #if HAS_ABL
1624
+    #if ENABLED(LCD_BED_LEVELING)
1625
+
1626
+      #if ENABLED(PROBE_MANUALLY)
1627
+        if (!g29_in_progress)
1628
+      #endif
1629
+          MENU_ITEM(submenu, MSG_LEVEL_BED, lcd_level_bed);
1630
+
1631
+    #elif HAS_ABL
1632
+
1524 1633
       MENU_ITEM(gcode, MSG_LEVEL_BED,
1525 1634
         axis_homed[X_AXIS] && axis_homed[Y_AXIS] ? PSTR("G29") : PSTR("G28\nG29")
1526 1635
       );
1527
-    #elif ENABLED(MANUAL_BED_LEVELING)
1528
-      MENU_ITEM(submenu, MSG_LEVEL_BED, lcd_level_bed);
1636
+
1529 1637
     #endif
1530 1638
 
1531 1639
     #if DISABLED(NO_WORKSPACE_OFFSETS)
@@ -2253,7 +2361,7 @@ KeepDrawing:
2253 2361
       MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
2254 2362
     #endif
2255 2363
     // Manual bed leveling, Bed Z:
2256
-    #if ENABLED(MANUAL_BED_LEVELING)
2364
+    #if ENABLED(MESH_BED_LEVELING) && ENABLED(LCD_BED_LEVELING)
2257 2365
       MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1);
2258 2366
     #endif
2259 2367
     MENU_ITEM_EDIT(float5, MSG_ACC, &planner.acceleration, 10, 99000);

Loading…
Cancel
Save