Browse Source

Merge pull request #6187 from thinkyhead/rc_flsun_delta_autocal

Delta: DELTA_HEIGHT, G33 Auto-Calibrate, drop M206/M428, add M665 H
Scott Lahteine 7 years ago
parent
commit
cf6f483378
54 changed files with 3656 additions and 164 deletions
  1. 2
    2
      .travis.yml
  2. 17
    0
      Marlin/Conditionals_post.h
  3. 0
    1
      Marlin/Configuration.h
  4. 3
    3
      Marlin/Configuration_adv.h
  5. 36
    16
      Marlin/Marlin.h
  6. 445
    41
      Marlin/Marlin_main.cpp
  7. 36
    11
      Marlin/configuration_store.cpp
  8. 2
    2
      Marlin/example_configurations/Cartesio/Configuration.h
  9. 1
    1
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  10. 2
    2
      Marlin/example_configurations/Felix/Configuration.h
  11. 1
    1
      Marlin/example_configurations/Felix/Configuration_adv.h
  12. 2
    2
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  13. 2
    2
      Marlin/example_configurations/Hephestos/Configuration.h
  14. 1
    1
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  15. 2
    2
      Marlin/example_configurations/Hephestos_2/Configuration.h
  16. 1
    1
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  17. 2
    2
      Marlin/example_configurations/K8200/Configuration.h
  18. 1
    1
      Marlin/example_configurations/K8200/Configuration_adv.h
  19. 2
    2
      Marlin/example_configurations/K8400/Configuration.h
  20. 1
    1
      Marlin/example_configurations/K8400/Configuration_adv.h
  21. 2
    2
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  22. 2
    2
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  23. 2
    2
      Marlin/example_configurations/RigidBot/Configuration.h
  24. 1
    1
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  25. 2
    2
      Marlin/example_configurations/SCARA/Configuration.h
  26. 1
    1
      Marlin/example_configurations/SCARA/Configuration_adv.h
  27. 2
    2
      Marlin/example_configurations/TAZ4/Configuration.h
  28. 1
    1
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  29. 2
    2
      Marlin/example_configurations/TinyBoy2/Configuration.h
  30. 3
    3
      Marlin/example_configurations/TinyBoy2/Configuration_adv.h
  31. 2
    2
      Marlin/example_configurations/WITBOX/Configuration.h
  32. 1
    1
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  33. 2
    2
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  34. 1743
    0
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h
  35. 1137
    0
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h
  36. 14
    6
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h
  37. 19
    0
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h
  38. 14
    4
      Marlin/example_configurations/delta/generic/Configuration.h
  39. 4
    3
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  40. 14
    4
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  41. 4
    3
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  42. 14
    4
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  43. 21
    1
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  44. 14
    4
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  45. 21
    2
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  46. 2
    2
      Marlin/example_configurations/makibox/Configuration.h
  47. 1
    1
      Marlin/example_configurations/makibox/Configuration_adv.h
  48. 2
    2
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  49. 1
    1
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  50. 2
    2
      Marlin/example_configurations/wt150/Configuration.h
  51. 3
    3
      Marlin/example_configurations/wt150/Configuration_adv.h
  52. 6
    0
      Marlin/language_en.h
  53. 14
    4
      Marlin/ultralcd.cpp
  54. 24
    1
      buildroot/share/git/firstpush

+ 2
- 2
.travis.yml View File

@@ -388,9 +388,9 @@ script:
388 388
   - opt_enable AUTO_BED_LEVELING_BILINEAR Z_PROBE_ALLEN_KEY
389 389
   - build_marlin
390 390
   #
391
-  # Delta Config (Mini Kossel)
391
+  # Delta Config (FLSUN AC because it's complex)
392 392
   #
393
-  - use_example_configs delta/kossel_mini
393
+  - use_example_configs delta/FLSUN/auto_calibrate
394 394
   - build_marlin
395 395
   #
396 396
   # Makibox Config  need to check board type for Teensy++ 2.0

+ 17
- 0
Marlin/Conditionals_post.h View File

@@ -721,6 +721,14 @@
721 721
     #ifndef DELTA_TOWER_ANGLE_TRIM_3
722 722
       #define DELTA_TOWER_ANGLE_TRIM_3 0.0
723 723
     #endif
724
+    #if ENABLED(DELTA_AUTO_CALIBRATION)
725
+      #ifndef H_FACTOR
726
+        #define H_FACTOR 1.00
727
+      #endif
728
+      #ifndef R_FACTOR
729
+        #define R_FACTOR -2.25
730
+      #endif
731
+    #endif
724 732
   #endif
725 733
 
726 734
   /**
@@ -797,6 +805,15 @@
797 805
     #define HAS_FOLDER_SORTING (FOLDER_SORTING || ENABLED(SDSORT_GCODE))
798 806
   #endif
799 807
 
808
+  // Updated G92 behavior shifts the workspace
809
+  #define HAS_POSITION_SHIFT DISABLED(NO_WORKSPACE_OFFSETS)
810
+  // The home offset also shifts the coordinate space
811
+  #define HAS_HOME_OFFSET (DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DELTA))
812
+  // Either offset yields extra calculations on all moves
813
+  #define HAS_WORKSPACE_OFFSET (HAS_POSITION_SHIFT || HAS_HOME_OFFSET)
814
+  // M206 doesn't apply to DELTA
815
+  #define HAS_M206_COMMAND (HAS_HOME_OFFSET && DISABLED(DELTA))
816
+
800 817
   // LCD timeout to status screen default is 15s
801 818
   #ifndef LCD_TIMEOUT_TO_STATUS
802 819
     #define LCD_TIMEOUT_TO_STATUS 15000

+ 0
- 1
Marlin/Configuration.h View File

@@ -695,7 +695,6 @@
695 695
 //#define Z_MIN_PROBE_ENDSTOP
696 696
 #define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
697 697
 
698
-
699 698
 // Enable Z Probe Repeatability test to see how accurate your probe is
700 699
 //#define Z_MIN_PROBE_REPEATABILITY_TEST
701 700
 

+ 3
- 3
Marlin/Configuration_adv.h View File

@@ -677,7 +677,7 @@
677 677
 //#define BEZIER_CURVE_SUPPORT
678 678
 
679 679
 // G38.2 and G38.3 Probe Target
680
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
680
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
681 681
 //#define G38_PROBE_TARGET
682 682
 #if ENABLED(G38_PROBE_TARGET)
683 683
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
@@ -971,14 +971,14 @@
971 971
 
972 972
 #endif // ENABLED(HAVE_TMC2130)
973 973
 
974
+// @section L6470
975
+
974 976
 /**
975 977
  * Enable this section if you have L6470 motor drivers.
976 978
  * You need to import the L6470 library into the Arduino IDE for this.
977 979
  * (https://github.com/ameyer/Arduino-L6470)
978 980
  */
979 981
 
980
-// @section l6470
981
-
982 982
 //#define HAVE_L6470DRIVER
983 983
 #if ENABLED(HAVE_L6470DRIVER)
984 984
 

+ 36
- 16
Marlin/Marlin.h View File

@@ -228,32 +228,52 @@ extern volatile bool wait_for_heatup;
228 228
 extern float current_position[NUM_AXIS];
229 229
 
230 230
 // Workspace offsets
231
-#if DISABLED(NO_WORKSPACE_OFFSETS)
232
-  extern float position_shift[XYZ],
233
-               home_offset[XYZ],
234
-               workspace_offset[XYZ];
235
-  #define LOGICAL_POSITION(POS, AXIS) ((POS) + workspace_offset[AXIS])
236
-  #define RAW_POSITION(POS, AXIS)     ((POS) - workspace_offset[AXIS])
231
+#if HAS_WORKSPACE_OFFSET
232
+  #if HAS_HOME_OFFSET
233
+    extern float home_offset[XYZ];
234
+  #endif
235
+  #if HAS_POSITION_SHIFT
236
+    extern float position_shift[XYZ];
237
+  #endif
238
+#endif
239
+
240
+#if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
241
+  extern float workspace_offset[XYZ];
242
+  #define WORKSPACE_OFFSET(AXIS) workspace_offset[AXIS]
243
+#elif HAS_HOME_OFFSET
244
+  #define WORKSPACE_OFFSET(AXIS) home_offset[AXIS]
245
+#elif HAS_POSITION_SHIFT
246
+  #define WORKSPACE_OFFSET(AXIS) position_shift[AXIS]
247
+#else
248
+  #define WORKSPACE_OFFSET(AXIS) 0
249
+#endif
250
+
251
+#define LOGICAL_POSITION(POS, AXIS) ((POS) + WORKSPACE_OFFSET(AXIS))
252
+#define RAW_POSITION(POS, AXIS)     ((POS) - WORKSPACE_OFFSET(AXIS))
253
+
254
+#if HAS_POSITION_SHIFT || DISABLED(DELTA)
255
+  #define LOGICAL_X_POSITION(POS)   LOGICAL_POSITION(POS, X_AXIS)
256
+  #define LOGICAL_Y_POSITION(POS)   LOGICAL_POSITION(POS, Y_AXIS)
257
+  #define RAW_X_POSITION(POS)       RAW_POSITION(POS, X_AXIS)
258
+  #define RAW_Y_POSITION(POS)       RAW_POSITION(POS, Y_AXIS)
237 259
 #else
238
-  #define LOGICAL_POSITION(POS, AXIS) (POS)
239
-  #define RAW_POSITION(POS, AXIS)     (POS)
260
+  #define LOGICAL_X_POSITION(POS)   (POS)
261
+  #define LOGICAL_Y_POSITION(POS)   (POS)
262
+  #define RAW_X_POSITION(POS)       (POS)
263
+  #define RAW_Y_POSITION(POS)       (POS)
240 264
 #endif
241 265
 
242
-#define LOGICAL_X_POSITION(POS)     LOGICAL_POSITION(POS, X_AXIS)
243
-#define LOGICAL_Y_POSITION(POS)     LOGICAL_POSITION(POS, Y_AXIS)
244 266
 #define LOGICAL_Z_POSITION(POS)     LOGICAL_POSITION(POS, Z_AXIS)
245
-#define RAW_X_POSITION(POS)         RAW_POSITION(POS, X_AXIS)
246
-#define RAW_Y_POSITION(POS)         RAW_POSITION(POS, Y_AXIS)
247 267
 #define RAW_Z_POSITION(POS)         RAW_POSITION(POS, Z_AXIS)
248
-#define RAW_CURRENT_POSITION(AXIS)  RAW_POSITION(current_position[AXIS], AXIS)
268
+#define RAW_CURRENT_POSITION(A)     RAW_##A##_POSITION(current_position[A##_AXIS])
249 269
 
270
+// Hotend Offsets
250 271
 #if HOTENDS > 1
251 272
   extern float hotend_offset[XYZ][HOTENDS];
252 273
 #endif
253 274
 
254 275
 // Software Endstops
255
-extern float soft_endstop_min[XYZ];
256
-extern float soft_endstop_max[XYZ];
276
+extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
257 277
 
258 278
 #if HAS_SOFTWARE_ENDSTOPS
259 279
   extern bool soft_endstops_enabled;
@@ -263,7 +283,7 @@ extern float soft_endstop_max[XYZ];
263 283
   #define clamp_to_software_endstops(x) NOOP
264 284
 #endif
265 285
 
266
-#if DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DUAL_X_CARRIAGE) || ENABLED(DELTA)
286
+#if HAS_WORKSPACE_OFFSET || ENABLED(DUAL_X_CARRIAGE)
267 287
   void update_software_endstops(const AxisEnum axis);
268 288
 #endif
269 289
 

+ 445
- 41
Marlin/Marlin_main.cpp View File

@@ -61,6 +61,7 @@
61 61
  * G30 - Single Z probe, probes bed at X Y location (defaults to current XY location)
62 62
  * G31 - Dock sled (Z_PROBE_SLED only)
63 63
  * G32 - Undock sled (Z_PROBE_SLED only)
64
+ * G33 - Delta '4-point' auto calibration iteration
64 65
  * G38 - Probe target - similar to G28 except it uses the Z_MIN_PROBE for all three axes
65 66
  * G90 - Use Absolute Coordinates
66 67
  * G91 - Use Relative Coordinates
@@ -146,7 +147,7 @@
146 147
             S<print> T<travel> minimum speeds
147 148
             B<minimum segment time>
148 149
             X<max X jerk>, Y<max Y jerk>, Z<max Z jerk>, E<max E jerk>
149
- * M206 - Set additional homing offset.
150
+ * M206 - Set additional homing offset. (Disabled by NO_WORKSPACE_OFFSETS or DELTA)
150 151
  * M207 - Set Retract Length: S<length>, Feedrate: F<units/min>, and Z lift: Z<distance>. (Requires FWRETRACT)
151 152
  * M208 - Set Recover (unretract) Additional (!) Length: S<length> and Feedrate: F<units/min>. (Requires FWRETRACT)
152 153
  * M209 - Turn Automatic Retract Detection on/off: S<0|1> (For slicers that don't support G10/11). (Requires FWRETRACT)
@@ -179,7 +180,7 @@
179 180
  * M410 - Quickstop. Abort all planned moves.
180 181
  * M420 - Enable/Disable Leveling (with current values) S1=enable S0=disable (Requires MESH_BED_LEVELING or ABL)
181 182
  * M421 - Set a single Z coordinate in the Mesh Leveling grid. X<units> Y<units> Z<units> (Requires MESH_BED_LEVELING or AUTO_BED_LEVELING_UBL)
182
- * M428 - Set the home_offset based on the current_position. Nearest edge applies.
183
+ * M428 - Set the home_offset based on the current_position. Nearest edge applies. (Disabled by NO_WORKSPACE_OFFSETS or DELTA)
183 184
  * M500 - Store parameters in EEPROM. (Requires EEPROM_SETTINGS)
184 185
  * M501 - Restore parameters from EEPROM. (Requires EEPROM_SETTINGS)
185 186
  * M502 - Revert to the default "factory settings". ** Does not write them to EEPROM! **
@@ -408,18 +409,20 @@ bool axis_relative_modes[] = AXIS_RELATIVE_MODES,
408 409
 float filament_size[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(DEFAULT_NOMINAL_FILAMENT_DIA),
409 410
       volumetric_multiplier[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(1.0);
410 411
 
411
-#if DISABLED(NO_WORKSPACE_OFFSETS)
412
-
413
-  // The distance that XYZ has been offset by G92. Reset by G28.
414
-  float position_shift[XYZ] = { 0 };
415
-
416
-  // This offset is added to the configured home position.
417
-  // Set by M206, M428, or menu item. Saved to EEPROM.
418
-  float home_offset[XYZ] = { 0 };
419
-
420
-  // The above two are combined to save on computes
421
-  float workspace_offset[XYZ] = { 0 };
422
-
412
+#if HAS_WORKSPACE_OFFSET
413
+  #if HAS_POSITION_SHIFT
414
+    // The distance that XYZ has been offset by G92. Reset by G28.
415
+    float position_shift[XYZ] = { 0 };
416
+  #endif
417
+  #if HAS_HOME_OFFSET
418
+    // This offset is added to the configured home position.
419
+    // Set by M206, M428, or menu item. Saved to EEPROM.
420
+    float home_offset[XYZ] = { 0 };
421
+  #endif
422
+  #if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
423
+    // The above two are combined to save on computes
424
+    float workspace_offset[XYZ] = { 0 };
425
+  #endif
423 426
 #endif
424 427
 
425 428
 // Software Endstops are based on the configured limits.
@@ -1381,7 +1384,7 @@ bool get_target_extruder_from_command(int code) {
1381 1384
 
1382 1385
 #endif // DUAL_X_CARRIAGE
1383 1386
 
1384
-#if DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DUAL_X_CARRIAGE) || ENABLED(DELTA)
1387
+#if HAS_WORKSPACE_OFFSET || ENABLED(DUAL_X_CARRIAGE)
1385 1388
 
1386 1389
   /**
1387 1390
    * Software endstops can be used to monitor the open end of
@@ -1393,7 +1396,18 @@ bool get_target_extruder_from_command(int code) {
1393 1396
    * at the same positions relative to the machine.
1394 1397
    */
1395 1398
   void update_software_endstops(const AxisEnum axis) {
1396
-    const float offs = workspace_offset[axis] = home_offset[axis] + position_shift[axis];
1399
+    const float offs = 0.0
1400
+      #if HAS_HOME_OFFSET
1401
+        + home_offset[axis]
1402
+      #endif
1403
+      #if HAS_POSITION_SHIFT
1404
+        + position_shift[axis]
1405
+      #endif
1406
+    ;
1407
+
1408
+    #if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
1409
+      workspace_offset[axis] = offs;
1410
+    #endif
1397 1411
 
1398 1412
     #if ENABLED(DUAL_X_CARRIAGE)
1399 1413
       if (axis == X_AXIS) {
@@ -1426,8 +1440,10 @@ bool get_target_extruder_from_command(int code) {
1426 1440
     #if ENABLED(DEBUG_LEVELING_FEATURE)
1427 1441
       if (DEBUGGING(LEVELING)) {
1428 1442
         SERIAL_ECHOPAIR("For ", axis_codes[axis]);
1429
-        #if DISABLED(NO_WORKSPACE_OFFSETS)
1443
+        #if HAS_HOME_OFFSET
1430 1444
           SERIAL_ECHOPAIR(" axis:\n home_offset = ", home_offset[axis]);
1445
+        #endif
1446
+        #if HAS_POSITION_SHIFT
1431 1447
           SERIAL_ECHOPAIR("\n position_shift = ", position_shift[axis]);
1432 1448
         #endif
1433 1449
         SERIAL_ECHOPAIR("\n soft_endstop_min = ", soft_endstop_min[axis]);
@@ -1441,9 +1457,9 @@ bool get_target_extruder_from_command(int code) {
1441 1457
     #endif
1442 1458
   }
1443 1459
 
1444
-#endif // NO_WORKSPACE_OFFSETS
1460
+#endif // HAS_WORKSPACE_OFFSET || DUAL_X_CARRIAGE
1445 1461
 
1446
-#if DISABLED(NO_WORKSPACE_OFFSETS)
1462
+#if HAS_M206_COMMAND
1447 1463
   /**
1448 1464
    * Change the home offset for an axis, update the current
1449 1465
    * position and the software endstops to retain the same
@@ -1457,7 +1473,7 @@ bool get_target_extruder_from_command(int code) {
1457 1473
     home_offset[axis] = v;
1458 1474
     update_software_endstops(axis);
1459 1475
   }
1460
-#endif // NO_WORKSPACE_OFFSETS
1476
+#endif // HAS_M206_COMMAND
1461 1477
 
1462 1478
 /**
1463 1479
  * Set an axis' current position to its home position (after homing).
@@ -1488,7 +1504,7 @@ static void set_axis_is_at_home(AxisEnum axis) {
1488 1504
 
1489 1505
   axis_known_position[axis] = axis_homed[axis] = true;
1490 1506
 
1491
-  #if DISABLED(NO_WORKSPACE_OFFSETS)
1507
+  #if HAS_POSITION_SHIFT
1492 1508
     position_shift[axis] = 0;
1493 1509
     update_software_endstops(axis);
1494 1510
   #endif
@@ -1564,7 +1580,7 @@ static void set_axis_is_at_home(AxisEnum axis) {
1564 1580
 
1565 1581
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1566 1582
     if (DEBUGGING(LEVELING)) {
1567
-      #if DISABLED(NO_WORKSPACE_OFFSETS)
1583
+      #if HAS_HOME_OFFSET
1568 1584
         SERIAL_ECHOPAIR("> home_offset[", axis_codes[axis]);
1569 1585
         SERIAL_ECHOLNPAIR("] = ", home_offset[axis]);
1570 1586
       #endif
@@ -2299,7 +2315,7 @@ static void clean_up_after_endstop_or_probe_move() {
2299 2315
       SERIAL_PROTOCOLPGM(" Y: ");
2300 2316
       SERIAL_PROTOCOL_F(y, 3);
2301 2317
       SERIAL_PROTOCOLPGM(" Z: ");
2302
-      SERIAL_PROTOCOL_F(FIXFLOAT(measured_z), 3);
2318
+      SERIAL_PROTOCOL_F(measured_z, 3);
2303 2319
       SERIAL_EOL;
2304 2320
     }
2305 2321
 
@@ -4035,6 +4051,11 @@ inline void gcode_G28() {
4035 4051
    *  L  Set the Left limit of the probing grid
4036 4052
    *  R  Set the Right limit of the probing grid
4037 4053
    *
4054
+   * Parameters with DEBUG_LEVELING_FEATURE only:
4055
+   *
4056
+   *  C  Make a totally fake grid with no actual probing.
4057
+   *     For use in testing when no probing is possible.
4058
+   *
4038 4059
    * Parameters with BILINEAR leveling only:
4039 4060
    *
4040 4061
    *  Z  Supply an additional Z probe offset
@@ -4077,6 +4098,12 @@ inline void gcode_G28() {
4077 4098
       #endif
4078 4099
     #endif
4079 4100
 
4101
+    #if ENABLED(DEBUG_LEVELING_FEATURE) && DISABLED(PROBE_MANUALLY)
4102
+      const bool faux = code_seen('C') && code_value_bool();
4103
+    #else
4104
+      bool constexpr faux = false;
4105
+    #endif
4106
+
4080 4107
     // Don't allow auto-leveling without homing first
4081 4108
     if (axis_unhomed_error(true, true, true)) return;
4082 4109
 
@@ -4292,7 +4319,7 @@ inline void gcode_G28() {
4292 4319
         SYNC_PLAN_POSITION_KINEMATIC();
4293 4320
       }
4294 4321
 
4295
-      setup_for_endstop_or_probe_move();
4322
+      if (!faux) setup_for_endstop_or_probe_move();
4296 4323
 
4297 4324
       //xProbe = yProbe = measured_z = 0;
4298 4325
 
@@ -4550,7 +4577,7 @@ inline void gcode_G28() {
4550 4577
               if (!position_is_reachable(pos, true)) continue;
4551 4578
             #endif
4552 4579
 
4553
-            measured_z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
4580
+            measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
4554 4581
 
4555 4582
             if (isnan(measured_z)) {
4556 4583
               planner.abl_enabled = abl_should_enable;
@@ -4585,7 +4612,7 @@ inline void gcode_G28() {
4585 4612
           // Retain the last probe position
4586 4613
           xProbe = LOGICAL_X_POSITION(points[i].x);
4587 4614
           yProbe = LOGICAL_Y_POSITION(points[i].y);
4588
-          measured_z = points[i].z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
4615
+          measured_z = points[i].z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
4589 4616
         }
4590 4617
 
4591 4618
         if (isnan(measured_z)) {
@@ -4624,7 +4651,7 @@ inline void gcode_G28() {
4624 4651
     //
4625 4652
 
4626 4653
     // Restore state after probing
4627
-    clean_up_after_endstop_or_probe_move();
4654
+    if (!faux) clean_up_after_endstop_or_probe_move();
4628 4655
 
4629 4656
     #if ENABLED(DEBUG_LEVELING_FEATURE)
4630 4657
       if (DEBUGGING(LEVELING)) DEBUG_POS("> probing complete", current_position);
@@ -4890,8 +4917,366 @@ inline void gcode_G28() {
4890 4917
 
4891 4918
   #endif // Z_PROBE_SLED
4892 4919
 
4920
+  #if ENABLED(DELTA_AUTO_CALIBRATION)
4921
+    /**
4922
+     * G33: Delta '4-point' auto calibration iteration
4923
+     *
4924
+     * Usage: G33 <Cn> <Vn>
4925
+     *
4926
+     *  C  (default) = Calibrate endstops, height and delta radius
4927
+     *
4928
+     *  -2, 1-4: n x n probe points, default 3 x 3
4929
+     *
4930
+     *    1: probe center
4931
+     *       set height only - useful when z_offset is changed
4932
+     *    2: probe center and towers
4933
+     *       solve one '4 point' calibration
4934
+     *   -2: probe center and opposite the towers
4935
+     *       solve one '4 point' calibration
4936
+     *    3: probe 3 center points, towers and opposite-towers
4937
+     *       averages between 2 '4 point' calibrations
4938
+     *    4: probe 4 center points, towers, opposite-towers and itermediate points
4939
+     *       averages between 4 '4 point' calibrations
4940
+     *
4941
+     *  V  Verbose level (0-3, default 1)
4942
+     *
4943
+     *    0: Dry-run mode: no calibration
4944
+     *    1: Settings
4945
+     *    2: Setting + probe results
4946
+     *    3: Expert mode: setting + iteration factors (see Configuration_adv.h)
4947
+     *       This prematurely stops the iteration process when factors are found
4948
+     */
4949
+    inline void gcode_G33() {
4950
+
4951
+      stepper.synchronize();
4952
+
4953
+      #if PLANNER_LEVELING
4954
+        set_bed_leveling_enabled(false);
4955
+      #endif
4956
+
4957
+      const int8_t pp = code_seen('C') ? code_value_int() : DELTA_CALIBRATION_DEFAULT_POINTS,
4958
+                   probe_points = (WITHIN(pp, 1, 4) || pp == -2) ? pp : DELTA_CALIBRATION_DEFAULT_POINTS;
4959
+
4960
+      int8_t verbose_level = code_seen('V') ? code_value_byte() : 1;
4961
+
4962
+      #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
4963
+        #define _MAX_M33_V 3
4964
+        if (verbose_level == 3 && probe_points == 1) verbose_level--; // needs at least 4 points
4965
+      #else
4966
+        #define _MAX_M33_V 2
4967
+        if (verbose_level > 2)
4968
+          SERIAL_PROTOCOLLNPGM("Enable DELTA_CALIBRATE_EXPERT_MODE in Configuration_adv.h");
4969
+      #endif
4970
+
4971
+      if (!WITHIN(verbose_level, 0, _MAX_M33_V)) verbose_level = 1;
4972
+
4973
+      float zero_std_dev = verbose_level ? 999.0 : 0.0; // 0.0 in dry-run mode : forced end
4974
+
4975
+      gcode_G28();
4976
+
4977
+      float e_old[XYZ],
4978
+            dr_old = delta_radius,
4979
+            zh_old = home_offset[Z_AXIS];
4980
+      COPY(e_old,endstop_adj);
4981
+      #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
4982
+        // expert variables
4983
+        float h_f_old = 1.00, r_f_old = 0.00,
4984
+              h_diff_min = 1.00, r_diff_max = 0.10;
4985
+      #endif
4986
+
4987
+      // print settings
4988
+
4989
+      SERIAL_PROTOCOLLNPGM("G33 Auto Calibrate");
4990
+      SERIAL_PROTOCOLPGM("Checking... AC");
4991
+      if (verbose_level == 0) SERIAL_PROTOCOLPGM(" (DRY-RUN)");
4992
+      #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
4993
+        if (verbose_level == 3) SERIAL_PROTOCOLPGM(" (EXPERT)");
4994
+      #endif
4995
+      SERIAL_EOL;
4996
+      LCD_MESSAGEPGM("Checking... AC");
4997
+
4998
+      SERIAL_PROTOCOLPAIR("Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
4999
+      if (abs(probe_points) > 1) {
5000
+        SERIAL_PROTOCOLPGM("    Ex:");
5001
+        if (endstop_adj[A_AXIS] >= 0) SERIAL_CHAR('+');
5002
+        SERIAL_PROTOCOL_F(endstop_adj[A_AXIS], 2);
5003
+        SERIAL_PROTOCOLPGM("  Ey:");
5004
+        if (endstop_adj[B_AXIS] >= 0) SERIAL_CHAR('+');
5005
+        SERIAL_PROTOCOL_F(endstop_adj[B_AXIS], 2);
5006
+        SERIAL_PROTOCOLPGM("  Ez:");
5007
+        if (endstop_adj[C_AXIS] >= 0) SERIAL_CHAR('+');
5008
+        SERIAL_PROTOCOL_F(endstop_adj[C_AXIS], 2);
5009
+        SERIAL_PROTOCOLPAIR("    Radius:", delta_radius);
5010
+      }
5011
+      SERIAL_EOL;
5012
+
5013
+      #if ENABLED(Z_PROBE_SLED)
5014
+        DEPLOY_PROBE();
5015
+      #endif
5016
+
5017
+      float test_precision;
5018
+      int8_t iterations = 0;
5019
+
5020
+      do { // start iterations
5021
+
5022
+        setup_for_endstop_or_probe_move();
5023
+
5024
+        test_precision =
5025
+          #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
5026
+            // Expert mode : forced end at std_dev < 0.1
5027
+            (verbose_level == 3 && zero_std_dev < 0.1) ? 0.0 :
5028
+          #endif
5029
+          zero_std_dev
5030
+        ;
5031
+
5032
+        float z_at_pt[13] = { 0 };
5033
+
5034
+        iterations++;
5035
+
5036
+        // probe the points
5037
+
5038
+        int16_t center_points = 0;
5039
+
5040
+        if (probe_points != 3) {
5041
+          z_at_pt[0] += probe_pt(0.0, 0.0 , true, 1);
5042
+          center_points = 1;
5043
+        }
5044
+
5045
+        int16_t step_axis = 4;
5046
+        if (probe_points >= 3) {
5047
+          for (int8_t axis = 9; axis > 0; axis -= step_axis) { // uint8_t starts endless loop
5048
+            z_at_pt[0] += probe_pt(
5049
+              0.1 * cos(RADIANS(180 + 30 * axis)) * (DELTA_CALIBRATION_RADIUS),
5050
+              0.1 * sin(RADIANS(180 + 30 * axis)) * (DELTA_CALIBRATION_RADIUS), true, 1);
5051
+          }
5052
+          center_points += 3;
5053
+          z_at_pt[0] /= center_points;
5054
+        }
5055
+
5056
+        float S1 = z_at_pt[0], S2 = sq(S1);
5057
+
5058
+        int16_t N = 1, start = (probe_points == -2) ? 3 : 1;
5059
+        step_axis = (abs(probe_points) == 2) ? 4 : (probe_points == 3) ? 2 : 1;
5060
+
5061
+        if (probe_points != 1) {
5062
+          for (uint8_t axis = start; axis < 13; axis += step_axis)
5063
+            z_at_pt[axis] += probe_pt(
5064
+              cos(RADIANS(180 + 30 * axis)) * (DELTA_CALIBRATION_RADIUS),
5065
+              sin(RADIANS(180 + 30 * axis)) * (DELTA_CALIBRATION_RADIUS), true, 1
5066
+            );
5067
+
5068
+          if (probe_points == 4) step_axis = 2;
5069
+        }
5070
+
5071
+        for (uint8_t axis = start; axis < 13; axis += step_axis) {
5072
+          if (probe_points == 4)
5073
+            z_at_pt[axis] = (z_at_pt[axis] + (z_at_pt[axis + 1] + z_at_pt[(axis + 10) % 12 + 1]) / 2.0) / 2.0;
5074
+
5075
+          S1 += z_at_pt[axis];
5076
+          S2 += sq(z_at_pt[axis]);
5077
+          N++;
5078
+        }
5079
+        zero_std_dev = round(sqrt(S2 / N) * 1000.0) / 1000.0 + 0.00001; // deviation from zero plane
5080
+
5081
+        // Solve matrices
5082
+
5083
+        if (zero_std_dev < test_precision) {
5084
+          COPY(e_old, endstop_adj);
5085
+          dr_old = delta_radius;
5086
+          zh_old = home_offset[Z_AXIS];
5087
+
5088
+          float e_delta[XYZ] = { 0.0 }, r_delta = 0.0;
5089
+
5090
+          #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
5091
+            float h_f_new = 0.0, r_f_new = 0.0 , t_f_new = 0.0,
5092
+                  h_diff = 0.00, r_diff = 0.00;
5093
+          #endif
5094
+
5095
+          #define ZP(N,I) ((N) * z_at_pt[I])
5096
+          #define Z1000(I) ZP(1.00, I)
5097
+          #define Z1050(I) ZP(H_FACTOR, I)
5098
+          #define Z0700(I) ZP((H_FACTOR) * 2.0 / 3.00, I)
5099
+          #define Z0350(I) ZP((H_FACTOR) / 3.00, I)
5100
+          #define Z0175(I) ZP((H_FACTOR) / 6.00, I)
5101
+          #define Z2250(I) ZP(R_FACTOR, I)
5102
+          #define Z0750(I) ZP((R_FACTOR) / 3.00, I)
5103
+          #define Z0375(I) ZP((R_FACTOR) / 6.00, I)
5104
+
5105
+          switch (probe_points) {
5106
+            case 1:
5107
+              LOOP_XYZ(i) e_delta[i] = Z1000(0);
5108
+              r_delta = 0.00;
5109
+              break;
5110
+
5111
+            case 2:
5112
+              e_delta[X_AXIS] = Z1050(0) + Z0700(1) - Z0350(5) - Z0350(9);
5113
+              e_delta[Y_AXIS] = Z1050(0) - Z0350(1) + Z0700(5) - Z0350(9);
5114
+              e_delta[Z_AXIS] = Z1050(0) - Z0350(1) - Z0350(5) + Z0700(9);
5115
+              r_delta         = Z2250(0) - Z0750(1) - Z0750(5) - Z0750(9);
5116
+              break;
5117
+
5118
+            case -2:
5119
+              e_delta[X_AXIS] = Z1050(0) - Z0700(7) + Z0350(11) + Z0350(3);
5120
+              e_delta[Y_AXIS] = Z1050(0) + Z0350(7) - Z0700(11) + Z0350(3);
5121
+              e_delta[Z_AXIS] = Z1050(0) + Z0350(7) + Z0350(11) - Z0700(3);
5122
+              r_delta         = Z2250(0) - Z0750(7) - Z0750(11) - Z0750(3);
5123
+              break;
5124
+
5125
+            default:
5126
+              e_delta[X_AXIS] = Z1050(0) + Z0350(1) - Z0175(5) - Z0175(9) - Z0350(7) + Z0175(11) + Z0175(3);
5127
+              e_delta[Y_AXIS] = Z1050(0) - Z0175(1) + Z0350(5) - Z0175(9) + Z0175(7) - Z0350(11) + Z0175(3);
5128
+              e_delta[Z_AXIS] = Z1050(0) - Z0175(1) - Z0175(5) + Z0350(9) + Z0175(7) + Z0175(11) - Z0350(3);
5129
+              r_delta         = Z2250(0) - Z0375(1) - Z0375(5) - Z0375(9) - Z0375(7) - Z0375(11) - Z0375(3);
5130
+              break;
5131
+          }
5132
+
5133
+          #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
5134
+            // Calculate h & r factors
5135
+            if (verbose_level == 3) {
5136
+              LOOP_XYZ(axis) h_f_new += e_delta[axis] / 3;
5137
+              r_f_new = r_delta;
5138
+              h_diff = (1.0 / H_FACTOR) * (h_f_old - h_f_new) / h_f_old;
5139
+              if (h_diff < h_diff_min && h_diff > 0.9) h_diff_min = h_diff;
5140
+              if (r_f_old != 0)
5141
+                r_diff = (   0.0301 * sq(R_FACTOR) * R_FACTOR
5142
+                           + 0.311  * sq(R_FACTOR)
5143
+                           + 1.1493 * R_FACTOR
5144
+                           + 1.7952
5145
+                         ) * (r_f_old - r_f_new) / r_f_old;
5146
+              if (r_diff > r_diff_max && r_diff < 0.4444) r_diff_max = r_diff;
5147
+              SERIAL_EOL;
5148
+
5149
+              h_f_old = h_f_new;
5150
+              r_f_old = r_f_new;
5151
+            }
5152
+          #endif // DELTA_CALIBRATE_EXPERT_MODE
5153
+
5154
+          // Adjust delta_height and endstops by the max amount
5155
+          LOOP_XYZ(axis) endstop_adj[axis] += e_delta[axis];
5156
+          delta_radius += r_delta;
5157
+
5158
+          const float z_temp = MAX3(endstop_adj[0], endstop_adj[1], endstop_adj[2]);
5159
+          home_offset[Z_AXIS] -= z_temp;
5160
+          LOOP_XYZ(i) endstop_adj[i] -= z_temp;
5161
+
5162
+          recalc_delta_settings(delta_radius, delta_diagonal_rod);
5163
+        }
5164
+        else { // !iterate
5165
+          // step one back
5166
+          COPY(endstop_adj, e_old);
5167
+          delta_radius = dr_old;
5168
+          home_offset[Z_AXIS] = zh_old;
5169
+
5170
+          recalc_delta_settings(delta_radius, delta_diagonal_rod);
5171
+        }
5172
+
5173
+        // print report
5174
+
5175
+        #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
5176
+          if (verbose_level == 3) {
5177
+            const float r_factor =   22.902 * sq(r_diff_max) * r_diff_max
5178
+                                   - 44.988 * sq(r_diff_max)
5179
+                                   + 31.697 * r_diff_max
5180
+                                   - 9.4439;
5181
+            SERIAL_PROTOCOLPAIR("h_factor:", 1.0 / h_diff_min);
5182
+            SERIAL_PROTOCOLPAIR("              r_factor:", r_factor);
5183
+            SERIAL_EOL;
5184
+          }
5185
+        #endif
5186
+        if (verbose_level == 2) {
5187
+          SERIAL_PROTOCOLPGM(".     c:");
5188
+          if (z_at_pt[0] > 0) SERIAL_CHAR('+');
5189
+          SERIAL_PROTOCOL_F(z_at_pt[0], 2);
5190
+          if (probe_points > 1) {
5191
+            SERIAL_PROTOCOLPGM("     x:");
5192
+            if (z_at_pt[1] >= 0) SERIAL_CHAR('+');
5193
+            SERIAL_PROTOCOL_F(z_at_pt[1], 2);
5194
+            SERIAL_PROTOCOLPGM("   y:");
5195
+            if (z_at_pt[5] >= 0) SERIAL_CHAR('+');
5196
+            SERIAL_PROTOCOL_F(z_at_pt[5], 2);
5197
+            SERIAL_PROTOCOLPGM("   z:");
5198
+            if (z_at_pt[9] >= 0) SERIAL_CHAR('+');
5199
+            SERIAL_PROTOCOL_F(z_at_pt[9], 2);
5200
+          }
5201
+          if (probe_points > 0) SERIAL_EOL;
5202
+          if (probe_points > 2 || probe_points == -2) {
5203
+            if (probe_points > 2) SERIAL_PROTOCOLPGM(".            ");
5204
+            SERIAL_PROTOCOLPGM("    yz:");
5205
+            if (z_at_pt[7] >= 0) SERIAL_CHAR('+');
5206
+            SERIAL_PROTOCOL_F(z_at_pt[7], 2);
5207
+            SERIAL_PROTOCOLPGM("  zx:");
5208
+            if (z_at_pt[11] >= 0) SERIAL_CHAR('+');
5209
+            SERIAL_PROTOCOL_F(z_at_pt[11], 2);
5210
+            SERIAL_PROTOCOLPGM("  xy:");
5211
+            if (z_at_pt[3] >= 0) SERIAL_CHAR('+');
5212
+            SERIAL_PROTOCOL_F(z_at_pt[3], 2);
5213
+            SERIAL_EOL;
5214
+          }
5215
+        }
5216
+        if (test_precision != 0.0) {            // !forced end
5217
+          if (zero_std_dev >= test_precision) {
5218
+            SERIAL_PROTOCOLPGM("Calibration OK");
5219
+            SERIAL_PROTOCOLLNPGM("                                   rolling back 1");
5220
+            LCD_MESSAGEPGM("Calibration OK");
5221
+            SERIAL_EOL;
5222
+          }
5223
+          else {                                // !end iterations
5224
+            char mess[15] = "No convergence";
5225
+            if (iterations < 31)
5226
+              sprintf_P(mess, PSTR("Iteration : %02i"), (int)iterations);
5227
+            SERIAL_PROTOCOL(mess);
5228
+            SERIAL_PROTOCOLPGM("                                   std dev:");
5229
+            SERIAL_PROTOCOL_F(zero_std_dev, 3);
5230
+            SERIAL_EOL;
5231
+            lcd_setstatus(mess);
5232
+          }
5233
+          SERIAL_PROTOCOLPAIR("Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
5234
+          if (abs(probe_points) > 1) {
5235
+            SERIAL_PROTOCOLPGM("    Ex:");
5236
+            if (endstop_adj[A_AXIS] >= 0) SERIAL_CHAR('+');
5237
+            SERIAL_PROTOCOL_F(endstop_adj[A_AXIS], 2);
5238
+            SERIAL_PROTOCOLPGM("  Ey:");
5239
+            if (endstop_adj[B_AXIS] >= 0) SERIAL_CHAR('+');
5240
+            SERIAL_PROTOCOL_F(endstop_adj[B_AXIS], 2);
5241
+            SERIAL_PROTOCOLPGM("  Ez:");
5242
+            if (endstop_adj[C_AXIS] >= 0) SERIAL_CHAR('+');
5243
+            SERIAL_PROTOCOL_F(endstop_adj[C_AXIS], 2);
5244
+            SERIAL_PROTOCOLPAIR("    Radius:", delta_radius);
5245
+          }
5246
+          SERIAL_EOL;
5247
+          if (zero_std_dev >= test_precision)
5248
+            SERIAL_PROTOCOLLNPGM("Save with M500");
5249
+        }
5250
+        else {                                  // forced end
5251
+          #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
5252
+            if (verbose_level == 3)
5253
+              SERIAL_PROTOCOLLNPGM("Copy to Configuration_adv.h");
5254
+            else
5255
+          #endif
5256
+            {
5257
+              SERIAL_PROTOCOLPGM("End DRY-RUN                                      std dev:");
5258
+              SERIAL_PROTOCOL_F(zero_std_dev, 3);
5259
+              SERIAL_EOL;
5260
+            }
5261
+        }
5262
+
5263
+        clean_up_after_endstop_or_probe_move();
5264
+        stepper.synchronize();
5265
+
5266
+        gcode_G28();
5267
+
5268
+      } while (zero_std_dev < test_precision && iterations < 31);
5269
+
5270
+      #if ENABLED(Z_PROBE_SLED)
5271
+        RETRACT_PROBE();
5272
+      #endif
5273
+    }
5274
+
5275
+  #endif // DELTA_AUTO_CALIBRATION
5276
+
4893 5277
 #endif // HAS_BED_PROBE
4894 5278
 
5279
+
4895 5280
 #if ENABLED(G38_PROBE_TARGET)
4896 5281
 
4897 5282
   static bool G38_run_probe() {
@@ -4996,7 +5381,7 @@ inline void gcode_G92() {
4996 5381
         current_position[i] = code_value_axis_units(i);
4997 5382
         if (i != E_AXIS) didXYZ = true;
4998 5383
       #else
4999
-        #if DISABLED(NO_WORKSPACE_OFFSETS)
5384
+        #if HAS_POSITION_SHIFT
5000 5385
           float p = current_position[i];
5001 5386
         #endif
5002 5387
         float v = code_value_axis_units(i);
@@ -5005,7 +5390,7 @@ inline void gcode_G92() {
5005 5390
 
5006 5391
         if (i != E_AXIS) {
5007 5392
           didXYZ = true;
5008
-          #if DISABLED(NO_WORKSPACE_OFFSETS)
5393
+          #if HAS_POSITION_SHIFT
5009 5394
             position_shift[i] += v - p; // Offset the coordinate space
5010 5395
             update_software_endstops((AxisEnum)i);
5011 5396
           #endif
@@ -5620,7 +6005,7 @@ inline void gcode_M42() {
5620 6005
 
5621 6006
     if (axis_unhomed_error(true, true, true)) return;
5622 6007
 
5623
-    int8_t verbose_level = code_seen('V') ? code_value_byte() : 1;
6008
+    const int8_t verbose_level = code_seen('V') ? code_value_byte() : 1;
5624 6009
     if (!WITHIN(verbose_level, 0, 4)) {
5625 6010
       SERIAL_PROTOCOLLNPGM("?Verbose Level not plausible (0-4).");
5626 6011
       return;
@@ -7012,7 +7397,7 @@ inline void gcode_M205() {
7012 7397
   if (code_seen('E')) planner.max_jerk[E_AXIS] = code_value_axis_units(E_AXIS);
7013 7398
 }
7014 7399
 
7015
-#if DISABLED(NO_WORKSPACE_OFFSETS)
7400
+#if HAS_M206_COMMAND
7016 7401
 
7017 7402
   /**
7018 7403
    * M206: Set Additional Homing Offset (X Y Z). SCARA aliases T=X, P=Y
@@ -7031,12 +7416,13 @@ inline void gcode_M205() {
7031 7416
     report_current_position();
7032 7417
   }
7033 7418
 
7034
-#endif // NO_WORKSPACE_OFFSETS
7419
+#endif // HAS_M206_COMMAND
7035 7420
 
7036 7421
 #if ENABLED(DELTA)
7037 7422
   /**
7038 7423
    * M665: Set delta configurations
7039 7424
    *
7425
+   *    H = diagonal rod // AC-version
7040 7426
    *    L = diagonal rod
7041 7427
    *    R = delta radius
7042 7428
    *    S = segments per second
@@ -7045,6 +7431,12 @@ inline void gcode_M205() {
7045 7431
    *    C = Gamma (Tower 3) diagonal rod trim
7046 7432
    */
7047 7433
   inline void gcode_M665() {
7434
+    if (code_seen('H')) {
7435
+      home_offset[Z_AXIS] = code_value_linear_units() - DELTA_HEIGHT;
7436
+      current_position[Z_AXIS] += code_value_linear_units() - DELTA_HEIGHT - home_offset[Z_AXIS];
7437
+      home_offset[Z_AXIS] = code_value_linear_units() - DELTA_HEIGHT;
7438
+      update_software_endstops(Z_AXIS);
7439
+    }
7048 7440
     if (code_seen('L')) delta_diagonal_rod = code_value_linear_units();
7049 7441
     if (code_seen('R')) delta_radius = code_value_linear_units();
7050 7442
     if (code_seen('S')) delta_segments_per_second = code_value_float();
@@ -7903,7 +8295,7 @@ void quickstop_stepper() {
7903 8295
 
7904 8296
 #endif
7905 8297
 
7906
-#if DISABLED(NO_WORKSPACE_OFFSETS)
8298
+#if HAS_M206_COMMAND
7907 8299
 
7908 8300
   /**
7909 8301
    * M428: Set home_offset based on the distance between the
@@ -7945,7 +8337,7 @@ void quickstop_stepper() {
7945 8337
     }
7946 8338
   }
7947 8339
 
7948
-#endif // NO_WORKSPACE_OFFSETS
8340
+#endif // HAS_M206_COMMAND
7949 8341
 
7950 8342
 /**
7951 8343
  * M500: Store settings in EEPROM
@@ -8924,9 +9316,9 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
8924 9316
           // The newly-selected extruder XY is actually at...
8925 9317
           current_position[X_AXIS] += xydiff[X_AXIS];
8926 9318
           current_position[Y_AXIS] += xydiff[Y_AXIS];
8927
-          #if DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DUAL_X_CARRIAGE)
9319
+          #if HAS_WORKSPACE_OFFSET || ENABLED(DUAL_X_CARRIAGE)
8928 9320
             for (uint8_t i = X_AXIS; i <= Y_AXIS; i++) {
8929
-              #if DISABLED(NO_WORKSPACE_OFFSETS)
9321
+              #if HAS_POSITION_SHIFT
8930 9322
                 position_shift[i] += xydiff[i];
8931 9323
               #endif
8932 9324
               update_software_endstops((AxisEnum)i);
@@ -9192,6 +9584,15 @@ void process_next_command() {
9192 9584
               break;
9193 9585
 
9194 9586
         #endif // Z_PROBE_SLED
9587
+
9588
+        #if ENABLED(DELTA_AUTO_CALIBRATION)
9589
+
9590
+          case 33: // G33: Delta Auto Calibrate
9591
+            gcode_G33();
9592
+            break;
9593
+
9594
+        #endif // DELTA_AUTO_CALIBRATION
9595
+
9195 9596
       #endif // HAS_BED_PROBE
9196 9597
 
9197 9598
       #if ENABLED(G38_PROBE_TARGET)
@@ -9509,7 +9910,7 @@ void process_next_command() {
9509 9910
         gcode_M205();
9510 9911
         break;
9511 9912
 
9512
-      #if DISABLED(NO_WORKSPACE_OFFSETS)
9913
+      #if HAS_M206_COMMAND
9513 9914
         case 206: // M206: Set home offsets
9514 9915
           gcode_M206();
9515 9916
           break;
@@ -9677,7 +10078,7 @@ void process_next_command() {
9677 10078
           break;
9678 10079
       #endif
9679 10080
 
9680
-      #if DISABLED(NO_WORKSPACE_OFFSETS)
10081
+      #if HAS_M206_COMMAND
9681 10082
         case 428: // M428: Apply current_position to home_offset
9682 10083
           gcode_M428();
9683 10084
           break;
@@ -10198,8 +10599,8 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
10198 10599
    * splitting the move where it crosses mesh borders.
10199 10600
    */
10200 10601
   void mesh_line_to_destination(float fr_mm_s, uint8_t x_splits = 0xff, uint8_t y_splits = 0xff) {
10201
-    int cx1 = mbl.cell_index_x(RAW_CURRENT_POSITION(X_AXIS)),
10202
-        cy1 = mbl.cell_index_y(RAW_CURRENT_POSITION(Y_AXIS)),
10602
+    int cx1 = mbl.cell_index_x(RAW_CURRENT_POSITION(X)),
10603
+        cy1 = mbl.cell_index_y(RAW_CURRENT_POSITION(Y)),
10203 10604
         cx2 = mbl.cell_index_x(RAW_X_POSITION(destination[X_AXIS])),
10204 10605
         cy2 = mbl.cell_index_y(RAW_Y_POSITION(destination[Y_AXIS]));
10205 10606
     NOMORE(cx1, GRID_MAX_POINTS_X - 2);
@@ -11043,6 +11444,9 @@ void disable_all_steppers() {
11043 11444
       #if ENABLED(E3_IS_TMC2130)
11044 11445
         automatic_current_control(stepperE3);
11045 11446
       #endif
11447
+      #if ENABLED(E4_IS_TMC2130)
11448
+        automatic_current_control(stepperE4);
11449
+      #endif
11046 11450
     }
11047 11451
   }
11048 11452
 
@@ -11410,7 +11814,7 @@ void setup() {
11410 11814
   // This also updates variables in the planner, elsewhere
11411 11815
   (void)settings.load();
11412 11816
 
11413
-  #if DISABLED(NO_WORKSPACE_OFFSETS)
11817
+  #if HAS_M206_COMMAND
11414 11818
     // Initialize current position based on home_offset
11415 11819
     COPY(current_position, home_offset);
11416 11820
   #else

+ 36
- 11
Marlin/configuration_store.cpp View File

@@ -47,7 +47,7 @@
47 47
  *  100  Version                                    (char x4)
48 48
  *  104  EEPROM Checksum                            (uint16_t)
49 49
  *
50
- *  106            E_STEPPERS (uint8_t)
50
+ *  106            E_STEPPERS                       (uint8_t)
51 51
  *  107  M92 XYZE  planner.axis_steps_per_mm        (float x4 ... x8)
52 52
  *  123  M203 XYZE planner.max_feedrate_mm_s        (float x4 ... x8)
53 53
  *  139  M201 XYZE planner.max_acceleration_mm_per_s2 (uint32_t x4 ... x8)
@@ -202,7 +202,7 @@ void MarlinSettings::postprocess() {
202 202
 
203 203
   calculate_volumetric_multipliers();
204 204
 
205
-  #if DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DUAL_X_CARRIAGE) || ENABLED(DELTA)
205
+  #if HAS_HOME_OFFSET || ENABLED(DUAL_X_CARRIAGE)
206 206
     // Software endstops depend on home_offset
207 207
     LOOP_XYZ(i) update_software_endstops((AxisEnum)i);
208 208
   #endif
@@ -299,10 +299,18 @@ void MarlinSettings::postprocess() {
299 299
     EEPROM_WRITE(planner.min_travel_feedrate_mm_s);
300 300
     EEPROM_WRITE(planner.min_segment_time);
301 301
     EEPROM_WRITE(planner.max_jerk);
302
-    #if ENABLED(NO_WORKSPACE_OFFSETS)
303
-      float home_offset[XYZ] = { 0 };
302
+    #if !HAS_HOME_OFFSET
303
+      const float home_offset[XYZ] = { 0 };
304
+    #endif
305
+    #if ENABLED(DELTA)
306
+      dummy = 0.0;
307
+      EEPROM_WRITE(dummy);
308
+      EEPROM_WRITE(dummy);
309
+      dummy = DELTA_HEIGHT + home_offset[Z_AXIS];
310
+      EEPROM_WRITE(dummy);
311
+    #else
312
+      EEPROM_WRITE(home_offset);
304 313
     #endif
305
-    EEPROM_WRITE(home_offset);
306 314
 
307 315
     #if HOTENDS > 1
308 316
       // Skip hotend 0 which must be 0
@@ -488,7 +496,7 @@ void MarlinSettings::postprocess() {
488 496
       EEPROM_WRITE(dummy);
489 497
     }
490 498
 
491
-    // Save TCM2130 Configuration, and placeholder values
499
+    // Save TMC2130 Configuration, and placeholder values
492 500
     uint16_t val;
493 501
     #if ENABLED(HAVE_TMC2130)
494 502
       #if ENABLED(X_IS_TMC2130)
@@ -551,6 +559,12 @@ void MarlinSettings::postprocess() {
551 559
         val = 0;
552 560
       #endif
553 561
       EEPROM_WRITE(val);
562
+      #if ENABLED(E4_IS_TMC2130)
563
+        val = stepperE4.getCurrent();
564
+      #else
565
+        val = 0;
566
+      #endif
567
+      EEPROM_WRITE(val);
554 568
     #else
555 569
       val = 0;
556 570
       for (uint8_t q = 0; q < 11; ++q) EEPROM_WRITE(val);
@@ -639,11 +653,17 @@ void MarlinSettings::postprocess() {
639 653
       EEPROM_READ(planner.min_segment_time);
640 654
       EEPROM_READ(planner.max_jerk);
641 655
 
642
-      #if ENABLED(NO_WORKSPACE_OFFSETS)
656
+      #if !HAS_HOME_OFFSET
643 657
         float home_offset[XYZ];
644 658
       #endif
645 659
       EEPROM_READ(home_offset);
646 660
 
661
+      #if ENABLED(DELTA)
662
+        home_offset[X_AXIS] = 0.0;
663
+        home_offset[Y_AXIS] = 0.0;
664
+        home_offset[Z_AXIS] -= DELTA_HEIGHT;
665
+      #endif
666
+
647 667
       #if HOTENDS > 1
648 668
         // Skip hotend 0 which must be 0
649 669
         for (uint8_t e = 1; e < HOTENDS; e++)
@@ -979,7 +999,7 @@ void MarlinSettings::reset() {
979 999
     planner.z_fade_height = 0.0;
980 1000
   #endif
981 1001
 
982
-  #if DISABLED(NO_WORKSPACE_OFFSETS)
1002
+  #if HAS_HOME_OFFSET
983 1003
     ZERO(home_offset);
984 1004
   #endif
985 1005
 
@@ -1019,7 +1039,10 @@ void MarlinSettings::reset() {
1019 1039
     delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND;
1020 1040
     COPY(delta_diagonal_rod_trim, drt);
1021 1041
     COPY(delta_tower_angle_trim, dta);
1042
+    home_offset[Z_AXIS] = 0;
1043
+
1022 1044
   #elif ENABLED(Z_DUAL_ENDSTOPS)
1045
+
1023 1046
     float z_endstop_adj =
1024 1047
       #ifdef Z_DUAL_ENDSTOPS_ADJUSTMENT
1025 1048
         Z_DUAL_ENDSTOPS_ADJUSTMENT
@@ -1027,6 +1050,7 @@ void MarlinSettings::reset() {
1027 1050
         0
1028 1051
       #endif
1029 1052
     ;
1053
+
1030 1054
   #endif
1031 1055
 
1032 1056
   #if ENABLED(ULTIPANEL)
@@ -1143,7 +1167,7 @@ void MarlinSettings::reset() {
1143 1167
 
1144 1168
   /**
1145 1169
    * M503 - Report current settings in RAM
1146
-   *   
1170
+   *
1147 1171
    * Unless specifically disabled, M503 is available even without EEPROM
1148 1172
    */
1149 1173
   void MarlinSettings::report(bool forReplay) {
@@ -1231,7 +1255,7 @@ void MarlinSettings::reset() {
1231 1255
     SERIAL_ECHOPAIR(" E", planner.max_jerk[E_AXIS]);
1232 1256
     SERIAL_EOL;
1233 1257
 
1234
-    #if DISABLED(NO_WORKSPACE_OFFSETS)
1258
+    #if HAS_M206_COMMAND
1235 1259
       CONFIG_ECHO_START;
1236 1260
       if (!forReplay) {
1237 1261
         SERIAL_ECHOLNPGM("Home offset (mm)");
@@ -1346,11 +1370,12 @@ void MarlinSettings::reset() {
1346 1370
       SERIAL_EOL;
1347 1371
       CONFIG_ECHO_START;
1348 1372
       if (!forReplay) {
1349
-        SERIAL_ECHOLNPGM("Delta settings: L=diagonal rod, R=radius, S=segments-per-second, ABC=diagonal rod trim, IJK=tower angle trim");
1373
+        SERIAL_ECHOLNPGM("Delta settings: L=diagonal_rod, R=radius, H=height, S=segments_per_second, ABC=diagonal_rod_trim_tower_[123]");
1350 1374
         CONFIG_ECHO_START;
1351 1375
       }
1352 1376
       SERIAL_ECHOPAIR("  M665 L", delta_diagonal_rod);
1353 1377
       SERIAL_ECHOPAIR(" R", delta_radius);
1378
+      SERIAL_ECHOPAIR(" H", DELTA_HEIGHT + home_offset[Z_AXIS]);
1354 1379
       SERIAL_ECHOPAIR(" S", delta_segments_per_second);
1355 1380
       SERIAL_ECHOPAIR(" A", delta_diagonal_rod_trim[A_AXIS]);
1356 1381
       SERIAL_ECHOPAIR(" B", delta_diagonal_rod_trim[B_AXIS]);

+ 2
- 2
Marlin/example_configurations/Cartesio/Configuration.h View File

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 1
- 1
Marlin/example_configurations/Cartesio/Configuration_adv.h View File

@@ -674,7 +674,7 @@
674 674
 //#define BEZIER_CURVE_SUPPORT
675 675
 
676 676
 // G38.2 and G38.3 Probe Target
677
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
677
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
678 678
 //#define G38_PROBE_TARGET
679 679
 #if ENABLED(G38_PROBE_TARGET)
680 680
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

+ 2
- 2
Marlin/example_configurations/Felix/Configuration.h View File

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 1
- 1
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -674,7 +674,7 @@
674 674
 //#define BEZIER_CURVE_SUPPORT
675 675
 
676 676
 // G38.2 and G38.3 Probe Target
677
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
677
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
678 678
 //#define G38_PROBE_TARGET
679 679
 #if ENABLED(G38_PROBE_TARGET)
680 680
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

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

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 2
- 2
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 1
- 1
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -674,7 +674,7 @@
674 674
 //#define BEZIER_CURVE_SUPPORT
675 675
 
676 676
 // G38.2 and G38.3 Probe Target
677
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
677
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
678 678
 //#define G38_PROBE_TARGET
679 679
 #if ENABLED(G38_PROBE_TARGET)
680 680
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

+ 2
- 2
Marlin/example_configurations/Hephestos_2/Configuration.h View File

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 1
- 1
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

@@ -658,7 +658,7 @@
658 658
 //#define BEZIER_CURVE_SUPPORT
659 659
 
660 660
 // G38.2 and G38.3 Probe Target
661
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
661
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
662 662
 //#define G38_PROBE_TARGET
663 663
 #if ENABLED(G38_PROBE_TARGET)
664 664
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

+ 2
- 2
Marlin/example_configurations/K8200/Configuration.h View File

@@ -86,8 +86,8 @@
86 86
 //===========================================================================
87 87
 //============================= DELTA Printer ===============================
88 88
 //===========================================================================
89
-// For a Delta printer replace the configuration files with the files in the
90
-// example_configurations/delta directory.
89
+// For Delta printers start with one of the configuration files in the
90
+// example_configurations/delta directory and customize for your machine.
91 91
 //
92 92
 
93 93
 //===========================================================================

+ 1
- 1
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -687,7 +687,7 @@
687 687
 //#define BEZIER_CURVE_SUPPORT
688 688
 
689 689
 // G38.2 and G38.3 Probe Target
690
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
690
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
691 691
 //#define G38_PROBE_TARGET
692 692
 #if ENABLED(G38_PROBE_TARGET)
693 693
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

+ 2
- 2
Marlin/example_configurations/K8400/Configuration.h View File

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 1
- 1
Marlin/example_configurations/K8400/Configuration_adv.h View File

@@ -674,7 +674,7 @@
674 674
 //#define BEZIER_CURVE_SUPPORT
675 675
 
676 676
 // G38.2 and G38.3 Probe Target
677
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
677
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
678 678
 //#define G38_PROBE_TARGET
679 679
 #if ENABLED(G38_PROBE_TARGET)
680 680
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

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

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

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

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 2
- 2
Marlin/example_configurations/RigidBot/Configuration.h View File

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 1
- 1
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

@@ -674,7 +674,7 @@
674 674
 //#define BEZIER_CURVE_SUPPORT
675 675
 
676 676
 // G38.2 and G38.3 Probe Target
677
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
677
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
678 678
 //#define G38_PROBE_TARGET
679 679
 #if ENABLED(G38_PROBE_TARGET)
680 680
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

+ 2
- 2
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 1
- 1
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -674,7 +674,7 @@
674 674
 //#define BEZIER_CURVE_SUPPORT
675 675
 
676 676
 // G38.2 and G38.3 Probe Target
677
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
677
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
678 678
 //#define G38_PROBE_TARGET
679 679
 #if ENABLED(G38_PROBE_TARGET)
680 680
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

+ 2
- 2
Marlin/example_configurations/TAZ4/Configuration.h View File

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 1
- 1
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

@@ -682,7 +682,7 @@
682 682
 //#define BEZIER_CURVE_SUPPORT
683 683
 
684 684
 // G38.2 and G38.3 Probe Target
685
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
685
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
686 686
 //#define G38_PROBE_TARGET
687 687
 #if ENABLED(G38_PROBE_TARGET)
688 688
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

+ 2
- 2
Marlin/example_configurations/TinyBoy2/Configuration.h View File

@@ -86,8 +86,8 @@
86 86
 //===========================================================================
87 87
 //============================= DELTA Printer ===============================
88 88
 //===========================================================================
89
-// For a Delta printer replace the configuration files with the files in the
90
-// example_configurations/delta directory.
89
+// For Delta printers start with one of the configuration files in the
90
+// example_configurations/delta directory and customize for your machine.
91 91
 //
92 92
 
93 93
 //===========================================================================

+ 3
- 3
Marlin/example_configurations/TinyBoy2/Configuration_adv.h View File

@@ -677,7 +677,7 @@
677 677
 //#define BEZIER_CURVE_SUPPORT
678 678
 
679 679
 // G38.2 and G38.3 Probe Target
680
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
680
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
681 681
 //#define G38_PROBE_TARGET
682 682
 #if ENABLED(G38_PROBE_TARGET)
683 683
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
@@ -971,14 +971,14 @@
971 971
 
972 972
 #endif // ENABLED(HAVE_TMC2130)
973 973
 
974
+// @section L6470
975
+
974 976
 /**
975 977
  * Enable this section if you have L6470 motor drivers.
976 978
  * You need to import the L6470 library into the Arduino IDE for this.
977 979
  * (https://github.com/ameyer/Arduino-L6470)
978 980
  */
979 981
 
980
-// @section l6470
981
-
982 982
 //#define HAVE_L6470DRIVER
983 983
 #if ENABLED(HAVE_L6470DRIVER)
984 984
 

+ 2
- 2
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 1
- 1
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -674,7 +674,7 @@
674 674
 //#define BEZIER_CURVE_SUPPORT
675 675
 
676 676
 // G38.2 and G38.3 Probe Target
677
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
677
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
678 678
 //#define G38_PROBE_TARGET
679 679
 #if ENABLED(G38_PROBE_TARGET)
680 680
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

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

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 1743
- 0
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h
File diff suppressed because it is too large
View File


+ 1137
- 0
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h
File diff suppressed because it is too large
View File


Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h → Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h View File

@@ -1,4 +1,4 @@
1
-/**
1
+/**
2 2
  * Marlin 3D Printer Firmware
3 3
  * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================
@@ -463,16 +463,24 @@
463 463
   // Horizontal distance bridged by diagonal push rods when effector is centered.
464 464
   #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-(DELTA_EFFECTOR_OFFSET)-(DELTA_CARRIAGE_OFFSET))
465 465
 
466
+  // height from z=0.00 to home position
467
+  #define DELTA_HEIGHT 280 // get this value from auto calibrate
468
+
466 469
   // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
467 470
   #define DELTA_PRINTABLE_RADIUS 85.0
468 471
 
469 472
   // Delta calibration menu
470 473
   // uncomment to add three points calibration menu option.
471 474
   // See http://minow.blogspot.com/index.html#4918805519571907051
472
-  // If needed, adjust the X, Y, Z calibration coordinates
473
-  // in ultralcd.cpp@lcd_delta_calibrate_menu()
474 475
   //#define DELTA_CALIBRATION_MENU
475 476
 
477
+  // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
478
+  //#define DELTA_AUTO_CALIBRATION
479
+  #if ENABLED(DELTA_AUTO_CALIBRATION)
480
+    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (1-4)
481
+    #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 15) // set the radius for the calibration probe points
482
+  #endif
483
+
476 484
   // After homing move down to a height where XY movement is unconstrained
477 485
   //#define DELTA_HOME_TO_SAFE_ZONE
478 486
 
@@ -1080,7 +1088,7 @@
1080 1088
 // For DELTA this is the top-center of the Cartesian print volume.
1081 1089
 //#define MANUAL_X_HOME_POS 0
1082 1090
 //#define MANUAL_Y_HOME_POS 0
1083
-#define MANUAL_Z_HOME_POS (286.5 - 6.5) // Distance between the nozzle to printbed after homing
1091
+#define MANUAL_Z_HOME_POS DELTA_HEIGHT // Distance between the nozzle to printbed after homing
1084 1092
 
1085 1093
 // Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
1086 1094
 //

Marlin/example_configurations/delta/flsun_kossel_mini/Configuration_adv.h → Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h View File

@@ -432,6 +432,25 @@
432 432
 #define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}  //  AZTEEG_X3_PRO
433 433
 
434 434
 //===========================================================================
435
+//============================== Delta Settings =============================
436
+//===========================================================================
437
+
438
+#if ENABLED(DELTA_AUTO_CALIBRATION)
439
+  /**
440
+   * Set the height short (H-10) with M665 Hx.xx.
441
+   * Set the delta_radius offset (R-5, R-10, R+5, R+10) with M665 Rx.xx.
442
+   * Run G33 Cx V3 (C2, C-2) with different values for C and R
443
+   * Take the average for R_FACTOR and maximum for H_FACTOR.
444
+   * Run the tests with default values!!!
445
+   */
446
+  //#define DELTA_CALIBRATE_EXPERT_MODE
447
+
448
+  // Remove the comments of the folling 2 lines to overide default values
449
+  #define H_FACTOR  1.02 //  1.0 < H_FACTOR <  1.11, default  1.00
450
+  #define R_FACTOR -3.95 // -6.7 < R_FACTOR < -2.25, default -2.25
451
+#endif
452
+
453
+//===========================================================================
435 454
 //=============================Additional Features===========================
436 455
 //===========================================================================
437 456
 

+ 14
- 4
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -1,4 +1,4 @@
1
-/**
1
+/**
2 2
  * Marlin 3D Printer Firmware
3 3
  * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================
@@ -453,6 +453,9 @@
453 453
   // Horizontal distance bridged by diagonal push rods when effector is centered.
454 454
   #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-(DELTA_EFFECTOR_OFFSET)-(DELTA_CARRIAGE_OFFSET))
455 455
 
456
+  // height from z=0.00 to home position
457
+  #define DELTA_HEIGHT 250 // get this value from auto calibrate
458
+
456 459
   // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
457 460
   #define DELTA_PRINTABLE_RADIUS 140.0
458 461
 
@@ -460,6 +463,13 @@
460 463
   // See http://minow.blogspot.com/index.html#4918805519571907051
461 464
   //#define DELTA_CALIBRATION_MENU
462 465
 
466
+  // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
467
+  //#define DELTA_AUTO_CALIBRATION
468
+  #if ENABLED(DELTA_AUTO_CALIBRATION)
469
+    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (1-4)
470
+    #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 15) // set the radius for the calibration probe points
471
+  #endif
472
+
463 473
   // After homing move down to a height where XY movement is unconstrained
464 474
   #define DELTA_HOME_TO_SAFE_ZONE
465 475
 
@@ -1067,7 +1077,7 @@
1067 1077
 // For DELTA this is the top-center of the Cartesian print volume.
1068 1078
 //#define MANUAL_X_HOME_POS 0
1069 1079
 //#define MANUAL_Y_HOME_POS 0
1070
-#define MANUAL_Z_HOME_POS 250 // Distance between the nozzle to printbed after homing
1080
+#define MANUAL_Z_HOME_POS DELTA_HEIGHT // Distance between the nozzle to printbed after homing
1071 1081
 
1072 1082
 // Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
1073 1083
 //

+ 4
- 3
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -439,12 +439,13 @@
439 439
   /**
440 440
    * Set the height short (H-10) with M665 Hx.xx.
441 441
    * Set the delta_radius offset (R-5, R-10, R+5, R+10) with M665 Rx.xx.
442
-   * Run G33 Cx V3 with different values (C2, C-2).
442
+   * Run G33 Cx V3 (C2, C-2) with different values for C and R
443 443
    * Take the average for R_FACTOR and maximum for H_FACTOR.
444
-   * If R_FACTOR is too low accuracy is reduced. Too high reduces iteration speed.
445 444
    * Run the tests with default values!!!
446 445
    */
447 446
   //#define DELTA_CALIBRATE_EXPERT_MODE
447
+
448
+  // Remove the comments of the folling 2 lines to overide default values
448 449
   //#define H_FACTOR  1.02 //  1.0 < H_FACTOR <  1.11, default  1.00
449 450
   //#define R_FACTOR -3.95 // -6.7 < R_FACTOR < -2.25, default -2.25
450 451
 #endif
@@ -694,7 +695,7 @@
694 695
 //#define BEZIER_CURVE_SUPPORT
695 696
 
696 697
 // G38.2 and G38.3 Probe Target
697
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
698
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
698 699
 //#define G38_PROBE_TARGET
699 700
 #if ENABLED(G38_PROBE_TARGET)
700 701
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

+ 14
- 4
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -1,4 +1,4 @@
1
-/**
1
+/**
2 2
  * Marlin 3D Printer Firmware
3 3
  * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================
@@ -453,6 +453,9 @@
453 453
   // Horizontal distance bridged by diagonal push rods when effector is centered.
454 454
   #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-(DELTA_EFFECTOR_OFFSET)-(DELTA_CARRIAGE_OFFSET))
455 455
 
456
+  // height from z=0.00 to home position
457
+  #define DELTA_HEIGHT 250 // get this value from auto calibrate
458
+
456 459
   // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
457 460
   #define DELTA_PRINTABLE_RADIUS 90.0
458 461
 
@@ -460,6 +463,13 @@
460 463
   // See http://minow.blogspot.com/index.html#4918805519571907051
461 464
   //#define DELTA_CALIBRATION_MENU
462 465
 
466
+  // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
467
+  //#define DELTA_AUTO_CALIBRATION
468
+  #if ENABLED(DELTA_AUTO_CALIBRATION)
469
+    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (1-4)
470
+    #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 15) // set the radius for the calibration probe points
471
+  #endif
472
+
463 473
   // After homing move down to a height where XY movement is unconstrained
464 474
   #define DELTA_HOME_TO_SAFE_ZONE
465 475
 
@@ -1063,7 +1073,7 @@
1063 1073
 // For DELTA this is the top-center of the Cartesian print volume.
1064 1074
 //#define MANUAL_X_HOME_POS 0
1065 1075
 //#define MANUAL_Y_HOME_POS 0
1066
-#define MANUAL_Z_HOME_POS 250 // Distance between the nozzle to printbed after homing
1076
+#define MANUAL_Z_HOME_POS DELTA_HEIGHT // Distance between the nozzle to printbed after homing
1067 1077
 
1068 1078
 // Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
1069 1079
 //

+ 4
- 3
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

@@ -439,12 +439,13 @@
439 439
   /**
440 440
    * Set the height short (H-10) with M665 Hx.xx.
441 441
    * Set the delta_radius offset (R-5, R-10, R+5, R+10) with M665 Rx.xx.
442
-   * Run G33 Cx V3 with different values (C2, C-2).
442
+   * Run G33 Cx V3 (C2, C-2) with different values for C and R
443 443
    * Take the average for R_FACTOR and maximum for H_FACTOR.
444
-   * If R_FACTOR is too low accuracy is reduced. Too high reduces iteration speed.
445 444
    * Run the tests with default values!!!
446 445
    */
447 446
   //#define DELTA_CALIBRATE_EXPERT_MODE
447
+
448
+  // Remove the comments of the folling 2 lines to overide default values
448 449
   //#define H_FACTOR  1.02 //  1.0 < H_FACTOR <  1.11, default  1.00
449 450
   //#define R_FACTOR -3.95 // -6.7 < R_FACTOR < -2.25, default -2.25
450 451
 #endif
@@ -694,7 +695,7 @@
694 695
 //#define BEZIER_CURVE_SUPPORT
695 696
 
696 697
 // G38.2 and G38.3 Probe Target
697
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
698
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
698 699
 //#define G38_PROBE_TARGET
699 700
 #if ENABLED(G38_PROBE_TARGET)
700 701
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

+ 14
- 4
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

@@ -1,4 +1,4 @@
1
-/**
1
+/**
2 2
  * Marlin 3D Printer Firmware
3 3
  * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
@@ -74,8 +74,8 @@
74 74
 //===========================================================================
75 75
 //============================= DELTA Printer ===============================
76 76
 //===========================================================================
77
-// For a Delta printer replace the configuration files with the files in the
78
-// example_configurations/delta directory.
77
+// For Delta printers start with one of the configuration files in the
78
+// example_configurations/delta directory and customize for your machine.
79 79
 //
80 80
 
81 81
 //===========================================================================
@@ -440,6 +440,9 @@
440 440
   // Horizontal distance bridged by diagonal push rods when effector is centered.
441 441
   #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-(DELTA_EFFECTOR_OFFSET)-(DELTA_CARRIAGE_OFFSET))
442 442
 
443
+  // height from z=0.00 to home position
444
+  #define DELTA_HEIGHT 277 // get this value from auto calibrate
445
+
443 446
   // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
444 447
   #define DELTA_PRINTABLE_RADIUS 127.0
445 448
 
@@ -447,6 +450,13 @@
447 450
   // See http://minow.blogspot.com/index.html#4918805519571907051
448 451
   //#define DELTA_CALIBRATION_MENU
449 452
 
453
+  // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
454
+  //#define DELTA_AUTO_CALIBRATION
455
+  #if ENABLED(DELTA_AUTO_CALIBRATION)
456
+    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (1-4)
457
+    #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 15) // set the radius for the calibration probe points
458
+  #endif
459
+
450 460
   // After homing move down to a height where XY movement is unconstrained
451 461
   #define DELTA_HOME_TO_SAFE_ZONE
452 462
 
@@ -1071,7 +1081,7 @@
1071 1081
 // For DELTA this is the top-center of the Cartesian print volume.
1072 1082
 //#define MANUAL_X_HOME_POS 0
1073 1083
 //#define MANUAL_Y_HOME_POS 0
1074
-#define MANUAL_Z_HOME_POS 277 // Distance between the nozzle to printbed after homing
1084
+#define MANUAL_Z_HOME_POS DELTA_HEIGHT // Distance between the nozzle to printbed after homing
1075 1085
 
1076 1086
 // Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
1077 1087
 //

+ 21
- 1
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

@@ -437,6 +437,26 @@
437 437
 #define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}  //  AZTEEG_X3_PRO
438 438
 
439 439
 //===========================================================================
440
+//============================== Delta Settings =============================
441
+//===========================================================================
442
+
443
+#if ENABLED(DELTA_AUTO_CALIBRATION)
444
+  /**
445
+   * Set the height short (H-10) with M665 Hx.xx.
446
+   * Set the delta_radius offset (R-5, R-10, R+5, R+10) with M665 Rx.xx.
447
+   * Run G33 Cx V3 (C2, C-2) with different values for C and R
448
+   * Take the average for R_FACTOR and maximum for H_FACTOR.
449
+   * Run the tests with default values!!!
450
+   */
451
+  //#define DELTA_CALIBRATE_EXPERT_MODE
452
+
453
+  // Remove the comments of the folling 2 lines to overide default values
454
+  //#define H_FACTOR  1.02 //  1.0 < H_FACTOR <  1.11, default  1.00
455
+  //#define R_FACTOR -3.95 // -6.7 < R_FACTOR < -2.25, default -2.25
456
+#endif
457
+
458
+
459
+//===========================================================================
440 460
 //=============================Additional Features===========================
441 461
 //===========================================================================
442 462
 
@@ -681,7 +701,7 @@
681 701
 //#define BEZIER_CURVE_SUPPORT
682 702
 
683 703
 // G38.2 and G38.3 Probe Target
684
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
704
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
685 705
 //#define G38_PROBE_TARGET
686 706
 #if ENABLED(G38_PROBE_TARGET)
687 707
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

+ 14
- 4
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

@@ -1,4 +1,4 @@
1
-/**
1
+/**
2 2
  * Marlin 3D Printer Firmware
3 3
  * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================
@@ -458,6 +458,9 @@
458 458
   // Horizontal distance bridged by diagonal push rods when effector is centered.
459 459
   #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-(DELTA_EFFECTOR_OFFSET)-(DELTA_CARRIAGE_OFFSET) + 1)
460 460
 
461
+  // height from z=0.00 to home position
462
+  #define DELTA_HEIGHT 380 // get this value from auto calibrate
463
+
461 464
   // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
462 465
   #define DELTA_PRINTABLE_RADIUS 140.0
463 466
 
@@ -465,6 +468,13 @@
465 468
   // See http://minow.blogspot.com/index.html#4918805519571907051
466 469
   //#define DELTA_CALIBRATION_MENU
467 470
 
471
+  // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
472
+  //#define DELTA_AUTO_CALIBRATION
473
+  #if ENABLED(DELTA_AUTO_CALIBRATION)
474
+    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (1-4)
475
+    #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 15) // set the radius for the calibration probe points
476
+  #endif
477
+
468 478
   // After homing move down to a height where XY movement is unconstrained
469 479
   #define DELTA_HOME_TO_SAFE_ZONE
470 480
 
@@ -1078,7 +1088,7 @@
1078 1088
 // For DELTA this is the top-center of the Cartesian print volume.
1079 1089
 //#define MANUAL_X_HOME_POS 0
1080 1090
 //#define MANUAL_Y_HOME_POS 0
1081
-#define MANUAL_Z_HOME_POS 381.4 // Distance between the nozzle to printbed after homing
1091
+#define MANUAL_Z_HOME_POS DELTA_HEIGHT // Distance between the nozzle to printbed after homing
1082 1092
 
1083 1093
 // Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
1084 1094
 //

+ 21
- 2
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

@@ -1,4 +1,4 @@
1
-/**
1
+/**
2 2
  * Marlin 3D Printer Firmware
3 3
  * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
@@ -432,6 +432,25 @@
432 432
 #define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}  //  AZTEEG_X3_PRO
433 433
 
434 434
 //===========================================================================
435
+//============================== Delta Settings =============================
436
+//===========================================================================
437
+
438
+#if ENABLED(DELTA_AUTO_CALIBRATION)
439
+  /**
440
+   * Set the height short (H-10) with M665 Hx.xx.
441
+   * Set the delta_radius offset (R-5, R-10, R+5, R+10) with M665 Rx.xx.
442
+   * Run G33 Cx V3 (C2, C-2) with different values for C and R
443
+   * Take the average for R_FACTOR and maximum for H_FACTOR.
444
+   * Run the tests with default values!!!
445
+   */
446
+  //#define DELTA_CALIBRATE_EXPERT_MODE
447
+
448
+  // Remove the comments of the folling 2 lines to overide default values
449
+  //#define H_FACTOR  1.02 //  1.0 < H_FACTOR <  1.11, default  1.00
450
+  //#define R_FACTOR -3.95 // -6.7 < R_FACTOR < -2.25, default -2.25
451
+#endif
452
+
453
+//===========================================================================
435 454
 //=============================Additional Features===========================
436 455
 //===========================================================================
437 456
 
@@ -676,7 +695,7 @@
676 695
 //#define BEZIER_CURVE_SUPPORT
677 696
 
678 697
 // G38.2 and G38.3 Probe Target
679
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
698
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
680 699
 //#define G38_PROBE_TARGET
681 700
 #if ENABLED(G38_PROBE_TARGET)
682 701
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

+ 2
- 2
Marlin/example_configurations/makibox/Configuration.h View File

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 1
- 1
Marlin/example_configurations/makibox/Configuration_adv.h View File

@@ -674,7 +674,7 @@
674 674
 //#define BEZIER_CURVE_SUPPORT
675 675
 
676 676
 // G38.2 and G38.3 Probe Target
677
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
677
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
678 678
 //#define G38_PROBE_TARGET
679 679
 #if ENABLED(G38_PROBE_TARGET)
680 680
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

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

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 1
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

@@ -674,7 +674,7 @@
674 674
 //#define BEZIER_CURVE_SUPPORT
675 675
 
676 676
 // G38.2 and G38.3 Probe Target
677
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
677
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
678 678
 //#define G38_PROBE_TARGET
679 679
 #if ENABLED(G38_PROBE_TARGET)
680 680
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)

+ 2
- 2
Marlin/example_configurations/wt150/Configuration.h View File

@@ -70,8 +70,8 @@
70 70
 //===========================================================================
71 71
 //============================= DELTA Printer ===============================
72 72
 //===========================================================================
73
-// For a Delta printer replace the configuration files with the files in the
74
-// example_configurations/delta directory.
73
+// For Delta printers start with one of the configuration files in the
74
+// example_configurations/delta directory and customize for your machine.
75 75
 //
76 76
 
77 77
 //===========================================================================

+ 3
- 3
Marlin/example_configurations/wt150/Configuration_adv.h View File

@@ -677,7 +677,7 @@
677 677
 //#define BEZIER_CURVE_SUPPORT
678 678
 
679 679
 // G38.2 and G38.3 Probe Target
680
-// ENABLE PROBE_DOUBLE_TOUCH if you want G38 to double touch
680
+// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
681 681
 //#define G38_PROBE_TARGET
682 682
 #if ENABLED(G38_PROBE_TARGET)
683 683
   #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
@@ -971,14 +971,14 @@
971 971
 
972 972
 #endif // ENABLED(HAVE_TMC2130)
973 973
 
974
+// @section L6470
975
+
974 976
 /**
975 977
  * Enable this section if you have L6470 motor drivers.
976 978
  * You need to import the L6470 library into the Arduino IDE for this.
977 979
  * (https://github.com/ameyer/Arduino-L6470)
978 980
  */
979 981
 
980
-// @section l6470
981
-
982 982
 //#define HAVE_L6470DRIVER
983 983
 #if ENABLED(HAVE_L6470DRIVER)
984 984
 

+ 6
- 0
Marlin/language_en.h View File

@@ -498,6 +498,12 @@
498 498
 #ifndef MSG_DELTA_CALIBRATE_CENTER
499 499
   #define MSG_DELTA_CALIBRATE_CENTER          _UxGT("Calibrate Center")
500 500
 #endif
501
+#ifndef MSG_DELTA_AUTO_CALIBRATE
502
+  #define MSG_DELTA_AUTO_CALIBRATE            _UxGT("Auto Calibration")
503
+#endif
504
+#ifndef MSG_DELTA_HEIGHT_CALIBRATE
505
+  #define MSG_DELTA_HEIGHT_CALIBRATE          _UxGT("Set Delta Height")
506
+#endif
501 507
 #ifndef MSG_INFO_MENU
502 508
   #define MSG_INFO_MENU                       _UxGT("About Printer")
503 509
 #endif

+ 14
- 4
Marlin/ultralcd.cpp View File

@@ -817,7 +817,7 @@ void kill_screen(const char* lcd_msg) {
817 817
    *
818 818
    */
819 819
 
820
-  #if DISABLED(NO_WORKSPACE_OFFSETS)
820
+  #if HAS_M206_COMMAND
821 821
     /**
822 822
      * Set the home offset based on the current_position
823 823
      */
@@ -1672,7 +1672,7 @@ void kill_screen(const char* lcd_msg) {
1672 1672
 
1673 1673
     #endif
1674 1674
 
1675
-    #if DISABLED(NO_WORKSPACE_OFFSETS)
1675
+    #if HAS_M206_COMMAND
1676 1676
       //
1677 1677
       // Set Home Offsets
1678 1678
       //
@@ -1770,14 +1770,20 @@ void kill_screen(const char* lcd_msg) {
1770 1770
       lcd_goto_screen(_lcd_calibrate_homing);
1771 1771
     }
1772 1772
 
1773
+    #if ENABLED(DELTA_AUTO_CALIBRATION)
1774
+      #define _DELTA_TOWER_MOVE_RADIUS DELTA_CALIBRATION_RADIUS
1775
+    #else
1776
+      #define _DELTA_TOWER_MOVE_RADIUS DELTA_PRINTABLE_RADIUS
1777
+    #endif
1778
+
1773 1779
     // Move directly to the tower position with uninterpolated moves
1774 1780
     // If we used interpolated moves it would cause this to become re-entrant
1775 1781
     void _goto_tower_pos(const float &a) {
1776 1782
       current_position[Z_AXIS] = max(Z_HOMING_HEIGHT, Z_CLEARANCE_BETWEEN_PROBES) + (DELTA_PRINTABLE_RADIUS) / 5;
1777 1783
       line_to_current(Z_AXIS);
1778 1784
 
1779
-      current_position[X_AXIS] = a < 0 ? X_HOME_POS : sin(a) * -(DELTA_PRINTABLE_RADIUS);
1780
-      current_position[Y_AXIS] = a < 0 ? Y_HOME_POS : cos(a) *  (DELTA_PRINTABLE_RADIUS);
1785
+      current_position[X_AXIS] = a < 0 ? LOGICAL_X_POSITION(X_HOME_POS) : sin(a) * -(_DELTA_TOWER_MOVE_RADIUS);
1786
+      current_position[Y_AXIS] = a < 0 ? LOGICAL_Y_POSITION(Y_HOME_POS) : cos(a) *  (_DELTA_TOWER_MOVE_RADIUS);
1781 1787
       line_to_current(Z_AXIS);
1782 1788
 
1783 1789
       current_position[Z_AXIS] = 4.0;
@@ -1797,6 +1803,10 @@ void kill_screen(const char* lcd_msg) {
1797 1803
     void lcd_delta_calibrate_menu() {
1798 1804
       START_MENU();
1799 1805
       MENU_BACK(MSG_MAIN);
1806
+      #if ENABLED(DELTA_AUTO_CALIBRATION)
1807
+        MENU_ITEM(gcode, MSG_DELTA_AUTO_CALIBRATE, PSTR("G33 C"));
1808
+        MENU_ITEM(gcode, MSG_DELTA_HEIGHT_CALIBRATE, PSTR("G33 C1"));
1809
+      #endif
1800 1810
       MENU_ITEM(submenu, MSG_AUTO_HOME, _lcd_delta_calibrate_home);
1801 1811
       if (axis_homed[Z_AXIS]) {
1802 1812
         MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_X, _goto_tower_x);

+ 24
- 1
buildroot/share/git/firstpush View File

@@ -1,3 +1,26 @@
1 1
 #!/usr/bin/env bash
2
+#
3
+# firstpush
4
+#
5
+# Push a branch to 'origin' and open the
6
+# commit log to watch Travis CI progress.
7
+#
2 8
 
3
-git push --set-upstream origin `git branch | grep \* | sed 's/\* //g'`
9
+MFINFO=$(mfinfo) || exit
10
+IFS=' ' read -a INFO <<< "$MFINFO"
11
+FORK=${INFO[1]}
12
+REPO=${INFO[2]}
13
+BRANCH=${INFO[4]}
14
+
15
+git push --set-upstream origin $BRANCH
16
+
17
+TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
18
+URL="https://github.com/$FORK/$REPO/commits/$BRANCH"
19
+
20
+if [ -z "$TOOL" ]; then
21
+  echo "Can't find a tool to open the URL:"
22
+  echo $URL
23
+else
24
+  echo "Viewing commits on $BRANCH..."
25
+  "$TOOL" "$URL"
26
+fi

Loading…
Cancel
Save