Переглянути джерело

Simpler Allen Key config. Fixes, cleanups from refactor (#15256)

Scott Lahteine 4 роки тому
джерело
коміт
465c6d9230
Аккаунт користувача з таким Email не знайдено
62 змінених файлів з 393 додано та 689 видалено
  1. 1
    1
      Marlin/src/HAL/HAL_LPC1768/u8g/LCD_I2C_routines.c
  2. 1
    0
      Marlin/src/core/macros.h
  3. 1
    1
      Marlin/src/core/serial.cpp
  4. 1
    1
      Marlin/src/core/serial.h
  5. 2
    2
      Marlin/src/feature/I2CPositionEncoder.cpp
  6. 6
    6
      Marlin/src/feature/backlash.h
  7. 2
    4
      Marlin/src/feature/bedlevel/abl/abl.cpp
  8. 1
    1
      Marlin/src/feature/bedlevel/bedlevel.h
  9. 4
    4
      Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h
  10. 6
    6
      Marlin/src/feature/bedlevel/ubl/ubl.h
  11. 2
    2
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  12. 10
    10
      Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp
  13. 2
    2
      Marlin/src/feature/dac/stepper_dac.cpp
  14. 1
    1
      Marlin/src/feature/filwidth.h
  15. 2
    1
      Marlin/src/feature/runout.h
  16. 1
    5
      Marlin/src/gcode/bedlevel/abl/G29.cpp
  17. 2
    1
      Marlin/src/gcode/calibrate/G33.cpp
  18. 20
    27
      Marlin/src/gcode/calibrate/G425.cpp
  19. 5
    5
      Marlin/src/gcode/calibrate/M425.cpp
  20. 2
    2
      Marlin/src/gcode/control/M605.cpp
  21. 2
    5
      Marlin/src/gcode/feature/mixing/M166.cpp
  22. 3
    3
      Marlin/src/gcode/host/M114.cpp
  23. 16
    14
      Marlin/src/gcode/motion/G2_G3.cpp
  24. 2
    5
      Marlin/src/gcode/probe/G30.cpp
  25. 2
    0
      Marlin/src/inc/MarlinConfigPre.h
  26. 2
    0
      Marlin/src/inc/SanityCheck.h
  27. 9
    11
      Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp
  28. 1
    1
      Marlin/src/lcd/dogm/status_screen_lite_ST7920.h
  29. 2
    1
      Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/move_axis_screen.cpp
  30. 1
    1
      Marlin/src/lcd/ultralcd.cpp
  31. 2
    2
      Marlin/src/libs/L6470/L6470_Marlin.cpp
  32. 12
    11
      Marlin/src/libs/least_squares_fit.h
  33. 4
    12
      Marlin/src/libs/nozzle.cpp
  34. 3
    1
      Marlin/src/libs/numtostr.cpp
  35. 5
    1
      Marlin/src/libs/numtostr.h
  36. 3
    1
      Marlin/src/libs/stopwatch.h
  37. 5
    2
      Marlin/src/libs/vector_3.cpp
  38. 4
    0
      Marlin/src/libs/vector_3.h
  39. 7
    12
      Marlin/src/module/configuration_store.cpp
  40. 2
    6
      Marlin/src/module/delta.cpp
  41. 2
    2
      Marlin/src/module/motion.cpp
  42. 31
    31
      Marlin/src/module/planner.cpp
  43. 2
    4
      Marlin/src/module/planner.h
  44. 21
    111
      Marlin/src/module/probe.cpp
  45. 20
    19
      Marlin/src/module/stepper.cpp
  46. 3
    0
      Marlin/src/module/stepper.h
  47. 13
    12
      Marlin/src/module/temperature.cpp
  48. 29
    28
      Marlin/src/module/tool_change.cpp
  49. 7
    21
      config/examples/delta/Anycubic/Kossel/Configuration.h
  50. 7
    21
      config/examples/delta/Dreammaker/Overlord/Configuration.h
  51. 7
    21
      config/examples/delta/Dreammaker/Overlord_Pro/Configuration.h
  52. 10
    24
      config/examples/delta/FLSUN/auto_calibrate/Configuration.h
  53. 10
    24
      config/examples/delta/FLSUN/kossel/Configuration.h
  54. 11
    25
      config/examples/delta/FLSUN/kossel_mini/Configuration.h
  55. 7
    21
      config/examples/delta/Geeetech/Rostock 301/Configuration.h
  56. 7
    21
      config/examples/delta/Hatchbox_Alpha/Configuration.h
  57. 7
    21
      config/examples/delta/MKS/SBASE/Configuration.h
  58. 7
    21
      config/examples/delta/Tevo Little Monster/Configuration.h
  59. 7
    21
      config/examples/delta/generic/Configuration.h
  60. 11
    25
      config/examples/delta/kossel_mini/Configuration.h
  61. 8
    24
      config/examples/delta/kossel_pro/Configuration.h
  62. 7
    21
      config/examples/delta/kossel_xl/Configuration.h

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/u8g/LCD_I2C_routines.c Переглянути файл

@@ -33,7 +33,7 @@
33 33
 #include <lpc17xx_pinsel.h>
34 34
 #include <lpc17xx_libcfg_default.h>
35 35
 
36
-#include "../../../core/millis_t.h"
36
+typedef uint32_t millis_t;
37 37
 
38 38
 //////////////////////////////////////////////////////////////////////////////////////
39 39
 

+ 1
- 0
Marlin/src/core/macros.h Переглянути файл

@@ -79,6 +79,7 @@
79 79
 #define SBI32(n,b) (n |= _BV32(b))
80 80
 #define CBI32(n,b) (n &= ~_BV32(b))
81 81
 
82
+#define cu(x)      ((x)*(x)*(x))
82 83
 #define RADIANS(d) ((d)*float(M_PI)/180.0f)
83 84
 #define DEGREES(r) ((r)*180.0f/float(M_PI))
84 85
 #define HYPOT2(x,y) (sq(x)+sq(y))

+ 1
- 1
Marlin/src/core/serial.cpp Переглянути файл

@@ -68,7 +68,7 @@ void print_bin(const uint16_t val) {
68 68
   }
69 69
 }
70 70
 
71
-void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z) {
71
+void print_xyz(PGM_P const prefix, PGM_P const suffix, const float &x, const float &y, const float &z) {
72 72
   serialprintPGM(prefix);
73 73
   SERIAL_CHAR('(');
74 74
   SERIAL_ECHO(x);

+ 1
- 1
Marlin/src/core/serial.h Переглянути файл

@@ -186,7 +186,7 @@ void serial_spaces(uint8_t count);
186 186
 
187 187
 void print_bin(const uint16_t val);
188 188
 
189
-void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z);
190 189
 void print_xyz(PGM_P const prefix, PGM_P const suffix, const float xyz[]);
190
+void print_xyz(PGM_P const prefix, PGM_P const suffix, const float &x, const float &y, const float &z);
191 191
 #define SERIAL_POS(SUFFIX,VAR) do { print_xyz(PSTR("  " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); }while(0)
192 192
 #define SERIAL_XYZ(PREFIX,V...) do { print_xyz(PSTR(PREFIX), nullptr, V); }while(0)

+ 2
- 2
Marlin/src/feature/I2CPositionEncoder.cpp Переглянути файл

@@ -168,7 +168,7 @@ void I2CPositionEncoder::update() {
168 168
           if (errPrstIdx >= I2CPE_ERR_PRST_ARRAY_SIZE) {
169 169
             float sumP = 0;
170 170
             LOOP_L_N(i, I2CPE_ERR_PRST_ARRAY_SIZE) sumP += errPrst[i];
171
-            const int32_t errorP = int32_t(sumP * (1.0f / (I2CPE_ERR_PRST_ARRAY_SIZE)));
171
+            const int32_t errorP = int32_t(sumP * RECIPROCAL(I2CPE_ERR_PRST_ARRAY_SIZE));
172 172
             SERIAL_ECHO(axis_codes[encoderAxis]);
173 173
             SERIAL_ECHOLNPAIR(" - err detected: ", errorP * planner.steps_to_mm[encoderAxis], "mm; correcting!");
174 174
             babystep.add_steps(encoderAxis, -LROUND(errorP));
@@ -440,7 +440,7 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) {
440 440
       total += new_steps_mm;
441 441
 
442 442
       // swap start and end points so next loop runs from current position
443
-      float tempCoord = startCoord[encoderAxis];
443
+      const float tempCoord = startCoord[encoderAxis];
444 444
       startCoord[encoderAxis] = endCoord[encoderAxis];
445 445
       endCoord[encoderAxis] = tempCoord;
446 446
     }

+ 6
- 6
Marlin/src/feature/backlash.h Переглянути файл

@@ -60,27 +60,27 @@ public:
60 60
       static void measure_with_probe();
61 61
   #endif
62 62
 
63
-  static inline float get_measurement(const uint8_t e) {
63
+  static inline float get_measurement(const AxisEnum a) {
64 64
     // Return the measurement averaged over all readings
65 65
     return (
66 66
       #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
67
-        measured_count[e] > 0 ? measured_mm[e] / measured_count[e] :
67
+        measured_count[a] > 0 ? measured_mm[a] / measured_count[a] :
68 68
       #endif
69 69
       0
70 70
     );
71 71
     #if DISABLED(MEASURE_BACKLASH_WHEN_PROBING)
72
-      UNUSED(e);
72
+      UNUSED(a);
73 73
     #endif
74 74
   }
75 75
 
76
-  static inline bool has_measurement(const uint8_t e) {
76
+  static inline bool has_measurement(const AxisEnum a) {
77 77
     return (false
78 78
       #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
79
-        || (measured_count[e] > 0)
79
+        || (measured_count[a] > 0)
80 80
       #endif
81 81
     );
82 82
     #if DISABLED(MEASURE_BACKLASH_WHEN_PROBING)
83
-      UNUSED(e);
83
+      UNUSED(a);
84 84
     #endif
85 85
   }
86 86
 

+ 2
- 4
Marlin/src/feature/bedlevel/abl/abl.cpp Переглянути файл

@@ -282,11 +282,9 @@ float bilinear_z_offset(const float raw[XYZ]) {
282 282
               ry = raw[Y_AXIS] - bilinear_start[Y_AXIS];
283 283
 
284 284
   #if ENABLED(EXTRAPOLATE_BEYOND_GRID)
285
-    // Keep using the last grid box
286
-    #define FAR_EDGE_OR_BOX 2
285
+    #define FAR_EDGE_OR_BOX 2   // Keep using the last grid box
287 286
   #else
288
-    // Just use the grid far edge
289
-    #define FAR_EDGE_OR_BOX 1
287
+    #define FAR_EDGE_OR_BOX 1   // Just use the grid far edge
290 288
   #endif
291 289
 
292 290
   if (last_x != rx) {

+ 1
- 1
Marlin/src/feature/bedlevel/bedlevel.h Переглянути файл

@@ -56,7 +56,7 @@ class TemporaryBedLevelingState {
56 56
     TemporaryBedLevelingState(const bool enable);
57 57
     ~TemporaryBedLevelingState() { set_bed_leveling_enabled(saved); }
58 58
 };
59
-#define TEMPORARY_BED_LEVELING_STATE(enable) TemporaryBedLevelingState tbls(enable)
59
+#define TEMPORARY_BED_LEVELING_STATE(enable) const TemporaryBedLevelingState tbls(enable)
60 60
 
61 61
 #if HAS_MESH
62 62
 

+ 4
- 4
Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h Переглянути файл

@@ -73,22 +73,22 @@ public:
73 73
   }
74 74
 
75 75
   static int8_t cell_index_x(const float &x) {
76
-    int8_t cx = (x - (MESH_MIN_X)) * (1.0f / (MESH_X_DIST));
76
+    int8_t cx = (x - (MESH_MIN_X)) * RECIPROCAL(MESH_X_DIST);
77 77
     return constrain(cx, 0, (GRID_MAX_POINTS_X) - 2);
78 78
   }
79 79
 
80 80
   static int8_t cell_index_y(const float &y) {
81
-    int8_t cy = (y - (MESH_MIN_Y)) * (1.0f / (MESH_Y_DIST));
81
+    int8_t cy = (y - (MESH_MIN_Y)) * RECIPROCAL(MESH_Y_DIST);
82 82
     return constrain(cy, 0, (GRID_MAX_POINTS_Y) - 2);
83 83
   }
84 84
 
85 85
   static int8_t probe_index_x(const float &x) {
86
-    int8_t px = (x - (MESH_MIN_X) + 0.5f * (MESH_X_DIST)) * (1.0f / (MESH_X_DIST));
86
+    int8_t px = (x - (MESH_MIN_X) + 0.5f * (MESH_X_DIST)) * RECIPROCAL(MESH_X_DIST);
87 87
     return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
88 88
   }
89 89
 
90 90
   static int8_t probe_index_y(const float &y) {
91
-    int8_t py = (y - (MESH_MIN_Y) + 0.5f * (MESH_Y_DIST)) * (1.0f / (MESH_Y_DIST));
91
+    int8_t py = (y - (MESH_MIN_Y) + 0.5f * (MESH_Y_DIST)) * RECIPROCAL(MESH_Y_DIST);
92 92
     return WITHIN(py, 0, GRID_MAX_POINTS_Y - 1) ? py : -1;
93 93
   }
94 94
 

+ 6
- 6
Marlin/src/feature/bedlevel/ubl/ubl.h Переглянути файл

@@ -145,14 +145,14 @@ class unified_bed_leveling {
145 145
     FORCE_INLINE static void set_z(const int8_t px, const int8_t py, const float &z) { z_values[px][py] = z; }
146 146
 
147 147
     static int8_t get_cell_index_x(const float &x) {
148
-      const int8_t cx = (x - (MESH_MIN_X)) * (1.0f / (MESH_X_DIST));
148
+      const int8_t cx = (x - (MESH_MIN_X)) * RECIPROCAL(MESH_X_DIST);
149 149
       return constrain(cx, 0, (GRID_MAX_POINTS_X) - 1);   // -1 is appropriate if we want all movement to the X_MAX
150 150
     }                                                     // position. But with this defined this way, it is possible
151 151
                                                           // to extrapolate off of this point even further out. Probably
152 152
                                                           // that is OK because something else should be keeping that from
153 153
                                                           // happening and should not be worried about at this level.
154 154
     static int8_t get_cell_index_y(const float &y) {
155
-      const int8_t cy = (y - (MESH_MIN_Y)) * (1.0f / (MESH_Y_DIST));
155
+      const int8_t cy = (y - (MESH_MIN_Y)) * RECIPROCAL(MESH_Y_DIST);
156 156
       return constrain(cy, 0, (GRID_MAX_POINTS_Y) - 1);   // -1 is appropriate if we want all movement to the Y_MAX
157 157
     }                                                     // position. But with this defined this way, it is possible
158 158
                                                           // to extrapolate off of this point even further out. Probably
@@ -160,12 +160,12 @@ class unified_bed_leveling {
160 160
                                                           // happening and should not be worried about at this level.
161 161
 
162 162
     static int8_t find_closest_x_index(const float &x) {
163
-      const int8_t px = (x - (MESH_MIN_X) + (MESH_X_DIST) * 0.5) * (1.0f / (MESH_X_DIST));
163
+      const int8_t px = (x - (MESH_MIN_X) + (MESH_X_DIST) * 0.5) * RECIPROCAL(MESH_X_DIST);
164 164
       return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
165 165
     }
166 166
 
167 167
     static int8_t find_closest_y_index(const float &y) {
168
-      const int8_t py = (y - (MESH_MIN_Y) + (MESH_Y_DIST) * 0.5) * (1.0f / (MESH_Y_DIST));
168
+      const int8_t py = (y - (MESH_MIN_Y) + (MESH_Y_DIST) * 0.5) * RECIPROCAL(MESH_Y_DIST);
169 169
       return WITHIN(py, 0, GRID_MAX_POINTS_Y - 1) ? py : -1;
170 170
     }
171 171
 
@@ -210,7 +210,7 @@ class unified_bed_leveling {
210 210
         );
211 211
       }
212 212
 
213
-      const float xratio = (rx0 - mesh_index_to_xpos(x1_i)) * (1.0f / (MESH_X_DIST)),
213
+      const float xratio = (rx0 - mesh_index_to_xpos(x1_i)) * RECIPROCAL(MESH_X_DIST),
214 214
                   z1 = z_values[x1_i][yi];
215 215
 
216 216
       return z1 + xratio * (z_values[_MIN(x1_i, GRID_MAX_POINTS_X - 2) + 1][yi] - z1); // Don't allow x1_i+1 to be past the end of the array
@@ -239,7 +239,7 @@ class unified_bed_leveling {
239 239
         );
240 240
       }
241 241
 
242
-      const float yratio = (ry0 - mesh_index_to_ypos(y1_i)) * (1.0f / (MESH_Y_DIST)),
242
+      const float yratio = (ry0 - mesh_index_to_ypos(y1_i)) * RECIPROCAL(MESH_Y_DIST),
243 243
                   z1 = z_values[xi][y1_i];
244 244
 
245 245
       return z1 + yratio * (z_values[xi][_MIN(y1_i, GRID_MAX_POINTS_Y - 2) + 1] - z1); // Don't allow y1_i+1 to be past the end of the array

+ 2
- 2
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp Переглянути файл

@@ -441,7 +441,7 @@
441 441
 
442 442
         #if HAS_BED_PROBE
443 443
 
444
-          case 1:
444
+          case 1: {
445 445
             //
446 446
             // Invalidate Entire Mesh and Automatically Probe Mesh in areas that can be reached by the probe
447 447
             //
@@ -460,7 +460,7 @@
460 460
 
461 461
             report_current_position();
462 462
             probe_deployed = true;
463
-            break;
463
+          } break;
464 464
 
465 465
         #endif // HAS_BED_PROBE
466 466
 

+ 10
- 10
Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp Переглянути файл

@@ -88,7 +88,7 @@
88 88
       FINAL_MOVE:
89 89
 
90 90
       // The distance is always MESH_X_DIST so multiply by the constant reciprocal.
91
-      const float xratio = (end[X_AXIS] - mesh_index_to_xpos(cell_dest_xi)) * (1.0f / (MESH_X_DIST));
91
+      const float xratio = (end[X_AXIS] - mesh_index_to_xpos(cell_dest_xi)) * RECIPROCAL(MESH_X_DIST);
92 92
 
93 93
       float z1 = z_values[cell_dest_xi    ][cell_dest_yi    ] + xratio *
94 94
                 (z_values[cell_dest_xi + 1][cell_dest_yi    ] - z_values[cell_dest_xi][cell_dest_yi    ]),
@@ -98,7 +98,7 @@
98 98
       if (cell_dest_xi >= GRID_MAX_POINTS_X - 1) z1 = z2 = 0.0;
99 99
 
100 100
       // X cell-fraction done. Interpolate the two Z offsets with the Y fraction for the final Z offset.
101
-      const float yratio = (end[Y_AXIS] - mesh_index_to_ypos(cell_dest_yi)) * (1.0f / (MESH_Y_DIST)),
101
+      const float yratio = (end[Y_AXIS] - mesh_index_to_ypos(cell_dest_yi)) * RECIPROCAL(MESH_Y_DIST),
102 102
                   z0 = cell_dest_yi < GRID_MAX_POINTS_Y - 1 ? (z1 + (z2 - z1) * yratio) * planner.fade_scaling_factor_for_z(end[Z_AXIS]) : 0.0;
103 103
 
104 104
       // Undefined parts of the Mesh in z_values[][] are NAN.
@@ -373,10 +373,10 @@
373 373
     #if IS_KINEMATIC
374 374
       const float seconds = cartesian_xy_mm / feedrate;                                  // seconds to move xy distance at requested rate
375 375
       uint16_t segments = LROUND(delta_segments_per_second * seconds),                  // preferred number of segments for distance @ feedrate
376
-               seglimit = LROUND(cartesian_xy_mm * (1.0f / (DELTA_SEGMENT_MIN_LENGTH))); // number of segments at minimum segment length
376
+               seglimit = LROUND(cartesian_xy_mm * RECIPROCAL(DELTA_SEGMENT_MIN_LENGTH)); // number of segments at minimum segment length
377 377
       NOMORE(segments, seglimit);                                                        // limit to minimum segment length (fewer segments)
378 378
     #else
379
-      uint16_t segments = LROUND(cartesian_xy_mm * (1.0f / (DELTA_SEGMENT_MIN_LENGTH))); // cartesian fixed segment length
379
+      uint16_t segments = LROUND(cartesian_xy_mm * RECIPROCAL(DELTA_SEGMENT_MIN_LENGTH)); // cartesian fixed segment length
380 380
     #endif
381 381
 
382 382
     NOLESS(segments, 1U);                        // must have at least one segment
@@ -440,8 +440,8 @@
440 440
       // in top of loop and again re-find same adjacent cell and use it, just less efficient
441 441
       // for mesh inset area.
442 442
 
443
-      int8_t cell_xi = (raw[X_AXIS] - (MESH_MIN_X)) * (1.0f / (MESH_X_DIST)),
444
-             cell_yi = (raw[Y_AXIS] - (MESH_MIN_Y)) * (1.0f / (MESH_Y_DIST));
443
+      int8_t cell_xi = (raw[X_AXIS] - (MESH_MIN_X)) * RECIPROCAL(MESH_X_DIST),
444
+             cell_yi = (raw[Y_AXIS] - (MESH_MIN_Y)) * RECIPROCAL(MESH_Y_DIST);
445 445
 
446 446
       LIMIT(cell_xi, 0, (GRID_MAX_POINTS_X) - 1);
447 447
       LIMIT(cell_yi, 0, (GRID_MAX_POINTS_Y) - 1);
@@ -462,15 +462,15 @@
462 462
       float cx = raw[X_AXIS] - x0,   // cell-relative x and y
463 463
             cy = raw[Y_AXIS] - y0;
464 464
 
465
-      const float z_xmy0 = (z_x1y0 - z_x0y0) * (1.0f / (MESH_X_DIST)),   // z slope per x along y0 (lower left to lower right)
466
-                  z_xmy1 = (z_x1y1 - z_x0y1) * (1.0f / (MESH_X_DIST));   // z slope per x along y1 (upper left to upper right)
465
+      const float z_xmy0 = (z_x1y0 - z_x0y0) * RECIPROCAL(MESH_X_DIST),   // z slope per x along y0 (lower left to lower right)
466
+                  z_xmy1 = (z_x1y1 - z_x0y1) * RECIPROCAL(MESH_X_DIST);   // z slope per x along y1 (upper left to upper right)
467 467
 
468 468
             float z_cxy0 = z_x0y0 + z_xmy0 * cx;            // z height along y0 at cx (changes for each cx in cell)
469 469
 
470 470
       const float z_cxy1 = z_x0y1 + z_xmy1 * cx,            // z height along y1 at cx
471 471
                   z_cxyd = z_cxy1 - z_cxy0;                 // z height difference along cx from y0 to y1
472 472
 
473
-            float z_cxym = z_cxyd * (1.0f / (MESH_Y_DIST));  // z slope per y along cx from y0 to y1 (changes for each cx in cell)
473
+            float z_cxym = z_cxyd * RECIPROCAL(MESH_Y_DIST);  // z slope per y along cx from y0 to y1 (changes for each cx in cell)
474 474
 
475 475
       //    float z_cxcy = z_cxy0 + z_cxym * cy;            // interpolated mesh z height along cx at cy (do inside the segment loop)
476 476
 
@@ -479,7 +479,7 @@
479 479
       // each change by a constant for fixed segment lengths.
480 480
 
481 481
       const float z_sxy0 = z_xmy0 * diff[X_AXIS],                                     // per-segment adjustment to z_cxy0
482
-                  z_sxym = (z_xmy1 - z_xmy0) * (1.0f / (MESH_Y_DIST)) * diff[X_AXIS];  // per-segment adjustment to z_cxym
482
+                  z_sxym = (z_xmy1 - z_xmy0) * RECIPROCAL(MESH_Y_DIST) * diff[X_AXIS];  // per-segment adjustment to z_cxym
483 483
 
484 484
       for (;;) {  // for all segments within this mesh cell
485 485
 

+ 2
- 2
Marlin/src/feature/dac/stepper_dac.cpp Переглянути файл

@@ -74,8 +74,8 @@ void dac_current_raw(uint8_t channel, uint16_t val) {
74 74
   mcp4728_simpleCommand(UPDATE);
75 75
 }
76 76
 
77
-static float dac_perc(int8_t n) { return 100.0 * mcp4728_getValue(dac_order[n]) * (1.0f / (DAC_STEPPER_MAX)); }
78
-static float dac_amps(int8_t n) { return mcp4728_getDrvPct(dac_order[n]) * (DAC_STEPPER_MAX) * 0.125 * (1.0f / (DAC_STEPPER_SENSE)); }
77
+static float dac_perc(int8_t n) { return 100.0 * mcp4728_getValue(dac_order[n]) * RECIPROCAL(DAC_STEPPER_MAX); }
78
+static float dac_amps(int8_t n) { return mcp4728_getDrvPct(dac_order[n]) * (DAC_STEPPER_MAX) * 0.125 * RECIPROCAL(DAC_STEPPER_SENSE); }
79 79
 
80 80
 uint8_t dac_current_get_percent(AxisEnum axis) { return mcp4728_getDrvPct(dac_order[axis]); }
81 81
 void dac_current_set_percents(const uint8_t pct[XYZE]) {

+ 1
- 1
Marlin/src/feature/filwidth.h Переглянути файл

@@ -66,7 +66,7 @@ public:
66 66
   }
67 67
 
68 68
   // Convert raw measurement to mm
69
-  static inline float raw_to_mm(const uint16_t v) { return v * 5.0f * (1.0f / 16383.0f); }
69
+  static inline float raw_to_mm(const uint16_t v) { return v * 5.0f * RECIPROCAL(16383.0f); }
70 70
   static inline float raw_to_mm() { return raw_to_mm(raw); }
71 71
 
72 72
   // A scaled reading is ready

+ 2
- 1
Marlin/src/feature/runout.h Переглянути файл

@@ -27,7 +27,8 @@
27 27
 
28 28
 #include "../sd/cardreader.h"
29 29
 #include "../module/printcounter.h"
30
-#include "../module/stepper.h"
30
+#include "../module/planner.h"
31
+#include "../module/stepper.h" // for block_t
31 32
 #include "../gcode/queue.h"
32 33
 
33 34
 #include "../inc/MarlinConfig.h"

+ 1
- 5
Marlin/src/gcode/bedlevel/abl/G29.cpp Переглянути файл

@@ -769,11 +769,7 @@ G29_TYPE GcodeSuite::G29() {
769 769
 
770 770
       if (!dryrun && !isnan(measured_z)) {
771 771
         vector_3 planeNormal = vector_3::cross(points[0] - points[1], points[2] - points[1]).get_normal();
772
-        if (planeNormal.z < 0) {
773
-          planeNormal.x *= -1;
774
-          planeNormal.y *= -1;
775
-          planeNormal.z *= -1;
776
-        }
772
+        if (planeNormal.z < 0) planeNormal *= -1;
777 773
         planner.bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
778 774
 
779 775
         // Can't re-enable (on error) until the new grid is written

+ 2
- 1
Marlin/src/gcode/calibrate/G33.cpp Переглянути файл

@@ -369,10 +369,11 @@ static float auto_tune_a() {
369 369
         delta_r = {0.0},
370 370
         delta_t[ABC] = {0.0};
371 371
 
372
+  ZERO(delta_t);
372 373
   LOOP_XYZ(axis) {
373
-    LOOP_XYZ(axis_2) delta_t[axis_2] = 0.0;
374 374
     delta_t[axis] = diff;
375 375
     calc_kinematics_diff_probe_points(z_pt, delta_e, delta_r, delta_t);
376
+    delta_t[axis] = 0;
376 377
     a_fac += z_pt[uint8_t((axis * _4P_STEP) - _7P_STEP + NPP) % NPP + 1] / 6.0;
377 378
     a_fac -= z_pt[uint8_t((axis * _4P_STEP) + 1 + _7P_STEP)] / 6.0;
378 379
   }

+ 20
- 27
Marlin/src/gcode/calibrate/G425.cpp Переглянути файл

@@ -314,18 +314,16 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
314 314
 
315 315
   // The difference between the known and the measured location
316 316
   // of the calibration object is the positional error
317
-  m.pos_error[X_AXIS] =
318
-  #if HAS_X_CENTER
319
-    m.true_center[X_AXIS] - m.obj_center[X_AXIS];
320
-  #else
321
-    0;
322
-  #endif
323
-  m.pos_error[Y_AXIS] =
324
-  #if HAS_Y_CENTER
325
-    m.true_center[Y_AXIS] - m.obj_center[Y_AXIS];
326
-  #else
327
-    0;
328
-  #endif
317
+  m.pos_error[X_AXIS] = (0
318
+    #if HAS_X_CENTER
319
+      + m.true_center[X_AXIS] - m.obj_center[X_AXIS]
320
+    #endif
321
+  );
322
+  m.pos_error[Y_AXIS] = (0
323
+    #if HAS_Y_CENTER
324
+      + m.true_center[Y_AXIS] - m.obj_center[Y_AXIS]
325
+    #endif
326
+  );
329 327
   m.pos_error[Z_AXIS] = m.true_center[Z_AXIS] - m.obj_center[Z_AXIS];
330 328
 }
331 329
 
@@ -394,13 +392,13 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
394 392
 
395 393
   inline void report_measured_nozzle_dimensions(const measurements_t &m) {
396 394
     SERIAL_ECHOLNPGM("Nozzle Tip Outer Dimensions:");
397
-    #if HAS_X_CENTER
398
-      SERIAL_ECHOLNPAIR(" X", m.nozzle_outer_dimension[X_AXIS]);
399
-    #else
400
-      UNUSED(m);
401
-    #endif
402
-    #if HAS_Y_CENTER
403
-      SERIAL_ECHOLNPAIR(" Y", m.nozzle_outer_dimension[Y_AXIS]);
395
+    #if HAS_X_CENTER || HAS_Y_CENTER
396
+      #if HAS_X_CENTER
397
+        SERIAL_ECHOLNPAIR(" X", m.nozzle_outer_dimension[X_AXIS]);
398
+      #endif
399
+      #if HAS_Y_CENTER
400
+        SERIAL_ECHOLNPAIR(" Y", m.nozzle_outer_dimension[Y_AXIS]);
401
+      #endif
404 402
     #else
405 403
       UNUSED(m);
406 404
     #endif
@@ -412,16 +410,11 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
412 410
     // This function requires normalize_hotend_offsets() to be called
413 411
     //
414 412
     inline void report_hotend_offsets() {
415
-      for (uint8_t e = 1; e < HOTENDS; e++) {
416
-        SERIAL_ECHOPAIR("T", int(e));
417
-        SERIAL_ECHOLNPGM(" Hotend Offset:");
418
-        SERIAL_ECHOLNPAIR("  X: ", hotend_offset[X_AXIS][e]);
419
-        SERIAL_ECHOLNPAIR("  Y: ", hotend_offset[Y_AXIS][e]);
420
-        SERIAL_ECHOLNPAIR("  Z: ", hotend_offset[Z_AXIS][e]);
421
-        SERIAL_EOL();
422
-      }
413
+      for (uint8_t e = 1; e < HOTENDS; e++)
414
+        SERIAL_ECHOLNPAIR("T", int(e), " Hotend Offset X", hotend_offset[X_AXIS][e], " Y", hotend_offset[Y_AXIS][e], " Z", hotend_offset[Z_AXIS][e]);
423 415
     }
424 416
   #endif
417
+
425 418
 #endif // CALIBRATION_REPORTING
426 419
 
427 420
 /**

+ 5
- 5
Marlin/src/gcode/calibrate/M425.cpp Переглянути файл

@@ -46,10 +46,10 @@
46 46
 void GcodeSuite::M425() {
47 47
   bool noArgs = true;
48 48
 
49
-  LOOP_XYZ(i) {
50
-    if (parser.seen(axis_codes[i])) {
49
+  LOOP_XYZ(a) {
50
+    if (parser.seen(axis_codes[a])) {
51 51
       planner.synchronize();
52
-      backlash.distance_mm[i] = parser.has_value() ? parser.value_linear_units() : backlash.get_measurement(i);
52
+      backlash.distance_mm[a] = parser.has_value() ? parser.value_linear_units() : backlash.get_measurement(AxisEnum(a));
53 53
       noArgs = false;
54 54
     }
55 55
   }
@@ -88,10 +88,10 @@ void GcodeSuite::M425() {
88 88
     #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
89 89
       SERIAL_ECHOPGM("  Average measured backlash (mm):");
90 90
       if (backlash.has_any_measurement()) {
91
-        LOOP_XYZ(a) if (backlash.has_measurement(a)) {
91
+        LOOP_XYZ(a) if (backlash.has_measurement(AxisEnum(a))) {
92 92
           SERIAL_CHAR(' ');
93 93
           SERIAL_CHAR(axis_codes[a]);
94
-          SERIAL_ECHO(backlash.get_measurement(a));
94
+          SERIAL_ECHO(backlash.get_measurement(AxisEnum(a)));
95 95
         }
96 96
       }
97 97
       else

+ 2
- 2
Marlin/src/gcode/control/M605.cpp Переглянути файл

@@ -137,8 +137,8 @@
137 137
         DEBUG_EOL();
138 138
 
139 139
         HOTEND_LOOP() {
140
-          DEBUG_ECHOPAIR(" nozzle:", int(e));
141
-          LOOP_XYZ(j) DEBUG_ECHOPAIR("  hotend_offset[", axis_codes[j], "_AXIS][", int(e), "]=", hotend_offset[j][e]);
140
+          DEBUG_ECHOPAIR(" T", int(e));
141
+          LOOP_XYZ(a) DEBUG_ECHOPAIR("  hotend_offset[", axis_codes[a], "_AXIS][", int(e), "]=", hotend_offset[a][e]);
142 142
           DEBUG_EOL();
143 143
         }
144 144
         DEBUG_EOL();

+ 2
- 5
Marlin/src/gcode/feature/mixing/M166.cpp Переглянути файл

@@ -30,15 +30,12 @@
30 30
 #include "../../../feature/mixing.h"
31 31
 
32 32
 inline void echo_mix() {
33
-  SERIAL_ECHOPAIR(" (", int(mixer.mix[0]));
34
-  SERIAL_ECHOPAIR("%|", int(mixer.mix[1]));
35
-  SERIAL_ECHOPGM("%)");
33
+  SERIAL_ECHOPAIR(" (", int(mixer.mix[0]), "%|", int(mixer.mix[1]), "%)");
36 34
 }
37 35
 
38 36
 inline void echo_zt(const int t, const float &z) {
39 37
   mixer.update_mix_from_vtool(t);
40
-  SERIAL_ECHOPAIR(" Z", z);
41
-  SERIAL_ECHOPAIR(" T", t);
38
+  SERIAL_ECHOPAIR(" Z", z, " T", t);
42 39
   echo_mix();
43 40
 }
44 41
 

+ 3
- 3
Marlin/src/gcode/host/M114.cpp Переглянути файл

@@ -38,11 +38,11 @@
38 38
 
39 39
   void report_xyze(const float pos[], const uint8_t n = 4, const uint8_t precision = 3) {
40 40
     char str[12];
41
-    for (uint8_t i = 0; i < n; i++) {
41
+    for (uint8_t a = 0; a < n; a++) {
42 42
       SERIAL_CHAR(' ');
43
-      SERIAL_CHAR(axis_codes[i]);
43
+      SERIAL_CHAR(axis_codes[a]);
44 44
       SERIAL_CHAR(':');
45
-      SERIAL_ECHO(dtostrf(pos[i], 1, precision, str));
45
+      SERIAL_ECHO(dtostrf(pos[a], 1, precision, str));
46 46
     }
47 47
     SERIAL_EOL();
48 48
   }

+ 16
- 14
Marlin/src/gcode/motion/G2_G3.cpp Переглянути файл

@@ -280,20 +280,22 @@ void GcodeSuite::G2_G3(const bool clockwise) {
280 280
 
281 281
     float arc_offset[2] = { 0, 0 };
282 282
     if (parser.seenval('R')) {
283
-      const float r = parser.value_linear_units(),
284
-                  p1 = current_position[X_AXIS], q1 = current_position[Y_AXIS],
285
-                  p2 = destination[X_AXIS], q2 = destination[Y_AXIS];
286
-      if (r && (p2 != p1 || q2 != q1)) {
287
-        const float e = clockwise ^ (r < 0) ? -1 : 1,            // clockwise -1/1, counterclockwise 1/-1
288
-                    dx = p2 - p1, dy = q2 - q1,                  // X and Y differences
289
-                    d = HYPOT(dx, dy),                           // Linear distance between the points
290
-                    dinv = 1/d,                                  // Inverse of d
291
-                    h = SQRT(sq(r) - sq(d * 0.5f)),              // Distance to the arc pivot-point
292
-                    mx = (p1 + p2) * 0.5f, my = (q1 + q2) * 0.5f,// Point between the two points
293
-                    sx = -dy * dinv, sy = dx * dinv,             // Slope of the perpendicular bisector
294
-                    cx = mx + e * h * sx, cy = my + e * h * sy;  // Pivot-point of the arc
295
-        arc_offset[0] = cx - p1;
296
-        arc_offset[1] = cy - q1;
283
+      const float r = parser.value_linear_units();
284
+      if (r) {
285
+        const float p1 = current_position[X_AXIS], q1 = current_position[Y_AXIS],
286
+                    p2 = destination[X_AXIS], q2 = destination[Y_AXIS];
287
+        if (p2 != p1 || q2 != q1) {
288
+          const float e = clockwise ^ (r < 0) ? -1 : 1,            // clockwise -1/1, counterclockwise 1/-1
289
+                      dx = p2 - p1, dy = q2 - q1,                  // X and Y differences
290
+                      d = HYPOT(dx, dy),                           // Linear distance between the points
291
+                      dinv = 1/d,                                  // Inverse of d
292
+                      h = SQRT(sq(r) - sq(d * 0.5f)),              // Distance to the arc pivot-point
293
+                      mx = (p1 + p2) * 0.5f, my = (q1 + q2) * 0.5f,// Point between the two points
294
+                      sx = -dy * dinv, sy = dx * dinv,             // Slope of the perpendicular bisector
295
+                      cx = mx + e * h * sx, cy = my + e * h * sy;  // Pivot-point of the arc
296
+          arc_offset[0] = cx - p1;
297
+          arc_offset[1] = cy - q1;
298
+        }
297 299
       }
298 300
     }
299 301
     else {

+ 2
- 5
Marlin/src/gcode/probe/G30.cpp Переглянути файл

@@ -54,11 +54,8 @@ void GcodeSuite::G30() {
54 54
   const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE;
55 55
   const float measured_z = probe_pt(xpos, ypos, raise_after, 1);
56 56
 
57
-  if (!isnan(measured_z)) {
58
-    SERIAL_ECHOPAIR("Bed X: ", FIXFLOAT(xpos));
59
-    SERIAL_ECHOPAIR(" Y: ", FIXFLOAT(ypos));
60
-    SERIAL_ECHOLNPAIR(" Z: ", FIXFLOAT(measured_z));
61
-  }
57
+  if (!isnan(measured_z))
58
+    SERIAL_ECHOLNPAIR("Bed X: ", FIXFLOAT(xpos), " Y: ", FIXFLOAT(ypos), " Z: ", FIXFLOAT(measured_z));
62 59
 
63 60
   clean_up_after_endstop_or_probe_move();
64 61
 

+ 2
- 0
Marlin/src/inc/MarlinConfigPre.h Переглянути файл

@@ -43,3 +43,5 @@
43 43
 
44 44
 #include "Conditionals_adv.h"
45 45
 #include HAL_PATH(../HAL, inc/Conditionals_adv.h)
46
+
47
+#include <stdint.h>

+ 2
- 0
Marlin/src/inc/SanityCheck.h Переглянути файл

@@ -388,6 +388,8 @@
388 388
   #error "SDPOWER is now SDPOWER_PIN. Please update your configuration and/or pins."
389 389
 #elif defined(STRING_SPLASH_LINE1) || defined(STRING_SPLASH_LINE2)
390 390
   #error "STRING_SPLASH_LINE[12] are now obsolete. Please remove them from Configuration.h."
391
+#elif defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_X) || defined(Z_PROBE_ALLEN_KEY_STOW_1_X)
392
+  #error "Z_PROBE_ALLEN_KEY_(DEPLOY|STOW) coordinates are now a single setting. Please update your configuration."
391 393
 #endif
392 394
 
393 395
 #define BOARD_MKS_13        -1000

+ 9
- 11
Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp Переглянути файл

@@ -658,7 +658,7 @@ void ST7920_Lite_Status_Screen::draw_status_message() {
658 658
   #endif
659 659
 }
660 660
 
661
-void ST7920_Lite_Status_Screen::draw_position(const float x, const float y, const float z, bool position_known) {
661
+void ST7920_Lite_Status_Screen::draw_position(const float (&pos)[XYZE], const bool position_known) {
662 662
   char str[7];
663 663
   set_ddram_address(DDRAM_LINE_4);
664 664
   begin_data();
@@ -667,13 +667,13 @@ void ST7920_Lite_Status_Screen::draw_position(const float x, const float y, cons
667 667
   const unsigned char alt_label = position_known ? 0 : (ui.get_blink() ? ' ' : 0);
668 668
 
669 669
   write_byte(alt_label ? alt_label : 'X');
670
-  write_str(dtostrf(x, -4, 0, str), 4);
670
+  write_str(dtostrf(pos[X_AXIS], -4, 0, str), 4);
671 671
 
672 672
   write_byte(alt_label ? alt_label : 'Y');
673
-  write_str(dtostrf(y, -4, 0, str), 4);
673
+  write_str(dtostrf(pos[Y_AXIS], -4, 0, str), 4);
674 674
 
675 675
   write_byte(alt_label ? alt_label : 'Z');
676
-  write_str(dtostrf(z, -5, 1, str), 5);
676
+  write_str(dtostrf(pos[Z_AXIS], -5, 1, str), 5);
677 677
 }
678 678
 
679 679
 bool ST7920_Lite_Status_Screen::indicators_changed() {
@@ -826,16 +826,14 @@ void ST7920_Lite_Status_Screen::update_status_or_position(bool forceUpdate) {
826 826
       }
827 827
     }
828 828
 
829
-    if (countdown == 0 && (forceUpdate || position_changed() ||
829
+    if (countdown == 0 && (forceUpdate || position_changed()
830 830
       #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
831
-        blink_changed()
831
+        || blink_changed()
832 832
       #endif
833 833
     )) {
834
-      draw_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS],
835
-        #if ENABLED(DISABLE_REDUCED_ACCURACY_WARNING)
836
-          true
837
-        #else
838
-          all_axes_known()
834
+      draw_position(current_position, true
835
+        #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
836
+          && all_axes_known()
839 837
         #endif
840 838
       );
841 839
     }

+ 1
- 1
Marlin/src/lcd/dogm/status_screen_lite_ST7920.h Переглянути файл

@@ -86,7 +86,7 @@ class ST7920_Lite_Status_Screen {
86 86
     static void draw_print_time(const duration_t &elapsed);
87 87
     static void draw_feedrate_percentage(const uint16_t percentage);
88 88
     static void draw_status_message();
89
-    static void draw_position(const float x, const float y, const float z, bool position_known = true);
89
+    static void draw_position(const float (&pos)[XYZE], bool position_known = true);
90 90
 
91 91
     static bool indicators_changed();
92 92
     static bool position_changed();

+ 2
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/move_axis_screen.cpp Переглянути файл

@@ -36,7 +36,7 @@ void MoveAxisScreen::onEntry() {
36 36
   // ourselves. The relative distances are reset to zero whenever this
37 37
   // screen is entered.
38 38
 
39
-  for(uint8_t i = 0; i < ExtUI::extruderCount; i++) {
39
+  for (uint8_t i = 0; i < ExtUI::extruderCount; i++) {
40 40
     screen_data.MoveAxisScreen.e_rel[i] = 0;
41 41
   }
42 42
   BaseNumericAdjustmentScreen::onEntry();
@@ -111,6 +111,7 @@ float MoveAxisScreen::getManualFeedrate(uint8_t axis, float increment_mm) {
111 111
   // connect segments and even out the motion.
112 112
   constexpr float max_manual_feedrate[XYZE] = MAX_MANUAL_FEEDRATE;
113 113
   return min(max_manual_feedrate[axis]/60, abs(increment_mm * TOUCH_REPEATS_PER_SECOND * 0.80));
114
+  return min(max_manual_feedrate[axis] / 60, abs(increment_mm * TOUCH_REPEATS_PER_SECOND * 0.80));
114 115
 }
115 116
 
116 117
 void MoveAxisScreen::setManualFeedrate(ExtUI::axis_t axis, float increment_mm) {

+ 1
- 1
Marlin/src/lcd/ultralcd.cpp Переглянути файл

@@ -685,7 +685,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
685 685
         // previous invocation is being blocked. Modifications to manual_move_offset shouldn't be made while
686 686
         // processing_manual_move is true or the planner will get out of sync.
687 687
         processing_manual_move = true;
688
-        prepare_move_to_destination(); // will call set_current_from_destination()
688
+        prepare_move_to_destination(); // will set current_position from destination
689 689
         processing_manual_move = false;
690 690
 
691 691
         feedrate_mm_s = old_feedrate;

+ 2
- 2
Marlin/src/libs/L6470/L6470_Marlin.cpp Переглянути файл

@@ -384,8 +384,8 @@ bool L6470_Marlin::get_user_input(uint8_t &driver_count, uint8_t axis_index[3],
384 384
     } break;
385 385
 
386 386
     case 'Z': {
387
-      position_min = center[E_AXIS] - displacement;
388
-      position_max = center[E_AXIS] + displacement;
387
+      position_min = center[Z_AXIS] - displacement;
388
+      position_max = center[Z_AXIS] + displacement;
389 389
       echo_min_max('Z', position_min, position_max);
390 390
       if (false
391 391
         #ifdef Z_MIN_POS

+ 12
- 11
Marlin/src/libs/least_squares_fit.h Переглянути файл

@@ -51,18 +51,19 @@ void inline incremental_LSF_reset(struct linear_fit_data *lsf) {
51 51
 void inline incremental_WLSF(struct linear_fit_data *lsf, const float &x, const float &y, const float &z, const float &w) {
52 52
   // weight each accumulator by factor w, including the "number" of samples
53 53
   // (analogous to calling inc_LSF twice with same values to weight it by 2X)
54
-  lsf->xbar  += w * x;
55
-  lsf->ybar  += w * y;
56
-  lsf->zbar  += w * z;
57
-  lsf->x2bar += w * x * x;  // don't use sq(x) -- let compiler re-use w*x four times
58
-  lsf->y2bar += w * y * y;
59
-  lsf->z2bar += w * z * z;
60
-  lsf->xybar += w * x * y;
61
-  lsf->xzbar += w * x * z;
62
-  lsf->yzbar += w * y * z;
54
+  const float wx = w * x, wy = w * y, wz = w * z;
55
+  lsf->xbar  += wx;
56
+  lsf->ybar  += wy;
57
+  lsf->zbar  += wz;
58
+  lsf->x2bar += wx * x;
59
+  lsf->y2bar += wy * y;
60
+  lsf->z2bar += wz * z;
61
+  lsf->xybar += wx * y;
62
+  lsf->xzbar += wx * z;
63
+  lsf->yzbar += wy * z;
63 64
   lsf->N     += w;
64
-  lsf->max_absx = _MAX(ABS(w * x), lsf->max_absx);
65
-  lsf->max_absy = _MAX(ABS(w * y), lsf->max_absy);
65
+  lsf->max_absx = _MAX(ABS(wx), lsf->max_absx);
66
+  lsf->max_absy = _MAX(ABS(wy), lsf->max_absy);
66 67
 }
67 68
 
68 69
 void inline incremental_LSF(struct linear_fit_data *lsf, const float &x, const float &y, const float &z) {

+ 4
- 12
Marlin/src/libs/nozzle.cpp Переглянути файл

@@ -175,16 +175,9 @@ Nozzle nozzle;
175 175
     if (!TEST(cleans, Z_AXIS)) start.z = end.z = current_position[Z_AXIS];
176 176
 
177 177
     switch (pattern) {
178
-      case 1:
179
-        zigzag(start, end, strokes, objects);
180
-        break;
181
-
182
-      case 2:
183
-        circle(start, end, strokes, radius);
184
-        break;
185
-
186
-      default:
187
-        stroke(start, end, strokes);
178
+       case 1: zigzag(start, end, strokes, objects); break;
179
+       case 2: circle(start, end, strokes, radius);  break;
180
+      default: stroke(start, end, strokes);
188 181
     }
189 182
   }
190 183
 
@@ -193,8 +186,7 @@ Nozzle nozzle;
193 186
 #if ENABLED(NOZZLE_PARK_FEATURE)
194 187
 
195 188
   void Nozzle::park(const uint8_t z_action, const point_t &park/*=NOZZLE_PARK_POINT*/) {
196
-    const float fr_xy = NOZZLE_PARK_XY_FEEDRATE,
197
-                fr_z = NOZZLE_PARK_Z_FEEDRATE;
189
+    constexpr float fr_xy = NOZZLE_PARK_XY_FEEDRATE, fr_z = NOZZLE_PARK_Z_FEEDRATE;
198 190
 
199 191
     switch (z_action) {
200 192
       case 1: // Go to Z-park height

+ 3
- 1
Marlin/src/libs/numtostr.cpp Переглянути файл

@@ -21,6 +21,8 @@
21 21
  */
22 22
 
23 23
 #include "numtostr.h"
24
+
25
+#include "../inc/MarlinConfigPre.h"
24 26
 #include "../core/utility.h"
25 27
 
26 28
 char conv[8] = { 0 };
@@ -183,7 +185,7 @@ char* ftostr52(const float &f) {
183 185
     return &conv[3];
184 186
   }
185 187
 
186
-#endif // LCD_DECIMAL_SMALL_XY
188
+#endif
187 189
 
188 190
 // Convert float to fixed-length string with +123.4 / -123.4 format
189 191
 char* ftostr41sign(const float &f) {

+ 5
- 1
Marlin/src/libs/numtostr.h Переглянути файл

@@ -21,7 +21,7 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-#include "../inc/MarlinConfigPre.h"
24
+#include <stdint.h>
25 25
 
26 26
 // Convert a full-range unsigned 8bit int to a percentage
27 27
 char* ui8tostr4pct(const uint8_t i);
@@ -83,9 +83,13 @@ char* ftostr52sign(const float &x);
83 83
 // Convert unsigned float to string with 1234.5 format omitting trailing zeros
84 84
 char* ftostr51rj(const float &x);
85 85
 
86
+#include "../core/macros.h"
87
+
86 88
 // Convert float to rj string with 123 or -12 format
87 89
 FORCE_INLINE char* ftostr3(const float &x) { return i16tostr3(int16_t(x + (x < 0 ? -0.5f : 0.5f))); }
88 90
 
91
+#include "../inc/MarlinConfigPre.h"
92
+
89 93
 #if ENABLED(LCD_DECIMAL_SMALL_XY)
90 94
   // Convert float to rj string with 1234, _123, 12.3, _1.2, -123, _-12, or -1.2 format
91 95
   char* ftostr4sign(const float &fx);

+ 3
- 1
Marlin/src/libs/stopwatch.h Переглянути файл

@@ -25,7 +25,9 @@
25 25
 //#define DEBUG_STOPWATCH
26 26
 
27 27
 #include "../core/macros.h" // for FORCE_INLINE
28
-#include "../core/millis_t.h"
28
+
29
+#include <stdint.h>
30
+typedef uint32_t millis_t;
29 31
 
30 32
 /**
31 33
  * @brief Stopwatch class

+ 5
- 2
Marlin/src/libs/vector_3.cpp Переглянути файл

@@ -57,8 +57,11 @@ vector_3 vector_3::cross(const vector_3 &left, const vector_3 &right) {
57 57
                   left.x * right.y - left.y * right.x);
58 58
 }
59 59
 
60
-vector_3 vector_3::operator+(const vector_3 &v) { return vector_3((x + v.x), (y + v.y), (z + v.z)); }
61
-vector_3 vector_3::operator-(const vector_3 &v) { return vector_3((x - v.x), (y - v.y), (z - v.z)); }
60
+vector_3 vector_3::operator+(const vector_3 &v) { return vector_3(x + v.x, y + v.y, z + v.z); }
61
+vector_3 vector_3::operator-(const vector_3 &v) { return vector_3(x - v.x, y - v.y, z - v.z); }
62
+
63
+vector_3  vector_3::operator* (const float &v) { return vector_3(x * v, y * v, z * v); }
64
+vector_3& vector_3::operator*=(const float &v) { x *= v; y *= v; z *= v; return *this; }
62 65
 
63 66
 vector_3 vector_3::get_normal() const {
64 67
   vector_3 normalized = vector_3(x, y, z);

+ 4
- 0
Marlin/src/libs/vector_3.h Переглянути файл

@@ -52,6 +52,10 @@ struct vector_3 {
52 52
 
53 53
   vector_3 operator+(const vector_3 &v);
54 54
   vector_3 operator-(const vector_3 &v);
55
+
56
+  vector_3  operator* (const float &v);
57
+  vector_3& operator*=(const float &v);
58
+
55 59
   void normalize();
56 60
   float get_length() const;
57 61
   vector_3 get_normal() const;

+ 7
- 12
Marlin/src/module/configuration_store.cpp Переглянути файл

@@ -1205,9 +1205,7 @@ void MarlinSettings::postprocess() {
1205 1205
         const float backlash_smoothing_mm = 3;
1206 1206
       #endif
1207 1207
       _FIELD_TEST(backlash_distance_mm);
1208
-      EEPROM_WRITE(backlash_distance_mm[X_AXIS]);
1209
-      EEPROM_WRITE(backlash_distance_mm[Y_AXIS]);
1210
-      EEPROM_WRITE(backlash_distance_mm[Z_AXIS]);
1208
+      EEPROM_WRITE(backlash_distance_mm);
1211 1209
       EEPROM_WRITE(backlash_correction);
1212 1210
       EEPROM_WRITE(backlash_smoothing_mm);
1213 1211
     }
@@ -2010,9 +2008,7 @@ void MarlinSettings::postprocess() {
2010 2008
           float backlash_smoothing_mm;
2011 2009
         #endif
2012 2010
         _FIELD_TEST(backlash_distance_mm);
2013
-        EEPROM_READ(backlash_distance_mm[X_AXIS]);
2014
-        EEPROM_READ(backlash_distance_mm[Y_AXIS]);
2015
-        EEPROM_READ(backlash_distance_mm[Z_AXIS]);
2011
+        EEPROM_READ(backlash_distance_mm);
2016 2012
         EEPROM_READ(backlash_correction);
2017 2013
         EEPROM_READ(backlash_smoothing_mm);
2018 2014
       }
@@ -2805,9 +2801,8 @@ void MarlinSettings::reset() {
2805 2801
       CONFIG_ECHO_START();
2806 2802
       for (uint8_t e = 1; e < HOTENDS; e++) {
2807 2803
         SERIAL_ECHOPAIR(
2808
-            "  M218 T", (int)e
2809
-          , " X", LINEAR_UNIT(hotend_offset[X_AXIS][e])
2810
-          , " Y", LINEAR_UNIT(hotend_offset[Y_AXIS][e])
2804
+          "  M218 T", (int)e,
2805
+          " X", LINEAR_UNIT(hotend_offset[X_AXIS][e]), " Y", LINEAR_UNIT(hotend_offset[Y_AXIS][e])
2811 2806
         );
2812 2807
         SERIAL_ECHOLNPAIR_F(" Z", LINEAR_UNIT(hotend_offset[Z_AXIS][e]), 3);
2813 2808
       }
@@ -2922,9 +2917,9 @@ void MarlinSettings::reset() {
2922 2917
       CONFIG_ECHO_HEADING("Endstop adjustment:");
2923 2918
       CONFIG_ECHO_START();
2924 2919
       SERIAL_ECHOLNPAIR(
2925
-          "  M666 X", LINEAR_UNIT(delta_endstop_adj[X_AXIS])
2926
-        , " Y", LINEAR_UNIT(delta_endstop_adj[Y_AXIS])
2927
-        , " Z", LINEAR_UNIT(delta_endstop_adj[Z_AXIS])
2920
+          "  M666 X", LINEAR_UNIT(delta_endstop_adj[A_AXIS])
2921
+        , " Y", LINEAR_UNIT(delta_endstop_adj[B_AXIS])
2922
+        , " Z", LINEAR_UNIT(delta_endstop_adj[C_AXIS])
2928 2923
       );
2929 2924
 
2930 2925
       CONFIG_ECHO_HEADING("Delta settings: L<diagonal_rod> R<radius> H<height> S<segments_per_s> B<calibration radius> XYZ<tower angle corrections>");

+ 2
- 6
Marlin/src/module/delta.cpp Переглянути файл

@@ -101,12 +101,8 @@ void recalc_delta_settings() {
101 101
  */
102 102
 
103 103
 #define DELTA_DEBUG(VAR) do { \
104
-    SERIAL_ECHOPAIR("cartesian X:", VAR[X_AXIS]); \
105
-    SERIAL_ECHOPAIR(" Y:", VAR[Y_AXIS]);          \
106
-    SERIAL_ECHOLNPAIR(" Z:", VAR[Z_AXIS]);        \
107
-    SERIAL_ECHOPAIR("delta A:", delta[A_AXIS]);   \
108
-    SERIAL_ECHOPAIR(" B:", delta[B_AXIS]);        \
109
-    SERIAL_ECHOLNPAIR(" C:", delta[C_AXIS]);      \
104
+    SERIAL_ECHOLNPAIR("Cartesian X", VAR[X_AXIS], " Y", VAR[Y_AXIS], " Z", VAR[Z_AXIS]);   \
105
+    SERIAL_ECHOLNPAIR("Delta A", delta[A_AXIS], " B", delta[B_AXIS], " C", delta[C_AXIS]); \
110 106
   }while(0)
111 107
 
112 108
 void inverse_kinematics(const float (&raw)[XYZ]) {

+ 2
- 2
Marlin/src/module/motion.cpp Переглянути файл

@@ -105,7 +105,7 @@ float current_position[XYZE] = { X_HOME_POS, Y_HOME_POS, Z_HOME_POS };
105 105
  * Cartesian Destination
106 106
  *   The destination for a move, filled in by G-code movement commands,
107 107
  *   and expected by functions like 'prepare_move_to_destination'.
108
- *   Set with 'get_destination_from_command' or 'set_destination_from_current'.
108
+ *   G-codes can set destination using 'get_destination_from_command'
109 109
  */
110 110
 float destination[XYZE]; // = { 0 }
111 111
 
@@ -670,7 +670,7 @@ void clean_up_after_endstop_or_probe_move() {
670 670
 
671 671
     // For SCARA enforce a minimum segment size
672 672
     #if IS_SCARA
673
-      NOMORE(segments, cartesian_mm * (1.0f / float(SCARA_MIN_SEGMENT_LENGTH)));
673
+      NOMORE(segments, cartesian_mm * RECIPROCAL(SCARA_MIN_SEGMENT_LENGTH));
674 674
     #endif
675 675
 
676 676
     // At least one segment is required

+ 31
- 31
Marlin/src/module/planner.cpp Переглянути файл

@@ -1174,7 +1174,10 @@ void Planner::recalculate() {
1174 1174
  * Maintain fans, paste extruder pressure,
1175 1175
  */
1176 1176
 void Planner::check_axes_activity() {
1177
-  uint8_t axis_active[NUM_AXIS] = { 0 };
1177
+
1178
+  #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E)
1179
+    uint8_t axis_active[NUM_AXIS] = { 0 };
1180
+  #endif
1178 1181
 
1179 1182
   #if FAN_COUNT > 0
1180 1183
     uint8_t tail_fan_speed[FAN_COUNT];
@@ -1190,10 +1193,9 @@ void Planner::check_axes_activity() {
1190 1193
   #endif
1191 1194
 
1192 1195
   if (has_blocks_queued()) {
1193
-    block_t* block;
1194 1196
 
1195 1197
     #if FAN_COUNT > 0 || ENABLED(BARICUDA)
1196
-      block = &block_buffer[block_buffer_tail];
1198
+      block_t *block = &block_buffer[block_buffer_tail];
1197 1199
     #endif
1198 1200
 
1199 1201
     #if FAN_COUNT > 0
@@ -1210,10 +1212,12 @@ void Planner::check_axes_activity() {
1210 1212
       #endif
1211 1213
     #endif
1212 1214
 
1213
-    for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
1214
-      block = &block_buffer[b];
1215
-      LOOP_XYZE(i) if (block->steps[i]) axis_active[i]++;
1216
-    }
1215
+    #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E)
1216
+      for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
1217
+        block_t *block = &block_buffer[b];
1218
+        LOOP_XYZE(i) if (block->steps[i]) axis_active[i] = true;
1219
+      }
1220
+    #endif
1217 1221
   }
1218 1222
   else {
1219 1223
     #if FAN_COUNT > 0
@@ -1517,14 +1521,14 @@ float Planner::get_axis_position_mm(const AxisEnum axis) {
1517 1521
       const bool was_enabled = STEPPER_ISR_ENABLED();
1518 1522
       if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
1519 1523
 
1520
-      // ((a1+a2)+(a1-a2))/2 -> (a1+a2+a1-a2)/2 -> (a1+a1)/2 -> a1
1521
-      // ((a1+a2)-(a1-a2))/2 -> (a1+a2-a1+a2)/2 -> (a2+a2)/2 -> a2
1522
-      axis_steps = 0.5f * (
1523
-        axis == CORE_AXIS_2 ? CORESIGN(stepper.position(CORE_AXIS_1) - stepper.position(CORE_AXIS_2))
1524
-                            : stepper.position(CORE_AXIS_1) + stepper.position(CORE_AXIS_2)
1525
-      );
1524
+      const int32_t p1 = stepper.position(CORE_AXIS_1),
1525
+                    p2 = stepper.position(CORE_AXIS_2);
1526 1526
 
1527 1527
       if (was_enabled) ENABLE_STEPPER_DRIVER_INTERRUPT();
1528
+
1529
+      // ((a1+a2)+(a1-a2))/2 -> (a1+a2+a1-a2)/2 -> (a1+a1)/2 -> a1
1530
+      // ((a1+a2)-(a1-a2))/2 -> (a1+a2-a1+a2)/2 -> (a2+a2)/2 -> a2
1531
+      axis_steps = (axis == CORE_AXIS_2 ? CORESIGN(p1 - p2) : p1 + p2) * 0.5f;
1528 1532
     }
1529 1533
     else
1530 1534
       axis_steps = stepper.position(axis);
@@ -1551,11 +1555,11 @@ void Planner::synchronize() {
1551 1555
  *
1552 1556
  * Add a new linear movement to the planner queue (in terms of steps).
1553 1557
  *
1554
- *  target      - target position in steps units
1555
- *  target_float - target position in direct (mm, degrees) units. optional
1556
- *  fr_mm_s     - (target) speed of the move
1557
- *  extruder    - target extruder
1558
- *  millimeters - the length of the movement, if known
1558
+ *  target        - target position in steps units
1559
+ *  target_float  - target position in direct (mm, degrees) units. optional
1560
+ *  fr_mm_s       - (target) speed of the move
1561
+ *  extruder      - target extruder
1562
+ *  millimeters   - the length of the movement, if known
1559 1563
  *
1560 1564
  * Returns true if movement was properly queued, false otherwise
1561 1565
  */
@@ -1644,18 +1648,14 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
1644 1648
   #endif
1645 1649
 
1646 1650
   /* <-- add a slash to enable
1647
-    SERIAL_ECHOPAIR("  _populate_block FR:", fr_mm_s);
1648
-    SERIAL_ECHOPAIR(" A:", target[A_AXIS]);
1649
-    SERIAL_ECHOPAIR(" (", da);
1650
-    SERIAL_ECHOPAIR(" steps) B:", target[B_AXIS]);
1651
-    SERIAL_ECHOPAIR(" (", db);
1652
-    SERIAL_ECHOPAIR(" steps) C:", target[C_AXIS]);
1653
-    SERIAL_ECHOPAIR(" (", dc);
1654
-    #if EXTRUDERS
1655
-      SERIAL_ECHOPAIR(" steps) E:", target[E_AXIS]);
1656
-      SERIAL_ECHOPAIR(" (", de);
1657
-    #endif
1658
-    SERIAL_ECHOLNPGM(" steps)");
1651
+    SERIAL_ECHOLNPAIR("  _populate_block FR:", fr_mm_s,
1652
+                      " A:", target[A_AXIS], " (", da, " steps)"
1653
+                      " B:", target[B_AXIS], " (", db, " steps)"
1654
+                      " C:", target[C_AXIS], " (", dc, " steps)"
1655
+                      #if EXTRUDERS
1656
+                        " E:", target[E_AXIS], " (", de, " steps)"
1657
+                      #endif
1658
+                    );
1659 1659
   //*/
1660 1660
 
1661 1661
   #if EITHER(PREVENT_COLD_EXTRUSION, PREVENT_LENGTHY_EXTRUDE)
@@ -2633,7 +2633,7 @@ bool Planner::buffer_segment(const float &a, const float &b, const float &c, con
2633 2633
   //*/
2634 2634
 
2635 2635
   // Queue the movement
2636
-    if (
2636
+  if (
2637 2637
     !_buffer_steps(target
2638 2638
       #if HAS_POSITION_FLOAT
2639 2639
         , target_float

+ 2
- 4
Marlin/src/module/planner.h Переглянути файл

@@ -507,8 +507,7 @@ class Planner {
507 507
           skew(pos);
508 508
         #endif
509 509
         #if HAS_LEVELING
510
-          if (leveling)
511
-            apply_leveling(pos);
510
+          if (leveling) apply_leveling(pos);
512 511
         #endif
513 512
         #if ENABLED(FWRETRACT)
514 513
           apply_retract(pos);
@@ -529,8 +528,7 @@ class Planner {
529 528
           unapply_retract(pos);
530 529
         #endif
531 530
         #if HAS_LEVELING
532
-          if (leveling)
533
-            unapply_leveling(pos);
531
+          if (leveling) unapply_leveling(pos);
534 532
         #endif
535 533
         #if ENABLED(SKEW_CORRECTION)
536 534
           unskew(pos);

+ 21
- 111
Marlin/src/module/probe.cpp Переглянути файл

@@ -155,167 +155,77 @@ float zprobe_zoffset; // Initialized by settings.load()
155 155
 #elif ENABLED(Z_PROBE_ALLEN_KEY)
156 156
 
157 157
   void run_deploy_moves_script() {
158
-    #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_Z)
159
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_X
160
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X current_position[X_AXIS]
161
-      #endif
162
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_Y
163
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y current_position[Y_AXIS]
164
-      #endif
165
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_Z
166
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z current_position[Z_AXIS]
167
-      #endif
158
+    #ifdef Z_PROBE_ALLEN_KEY_DEPLOY_1
168 159
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE
169 160
         #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE 0.0
170 161
       #endif
171
-      const float deploy_1[] = { Z_PROBE_ALLEN_KEY_DEPLOY_1_X, Z_PROBE_ALLEN_KEY_DEPLOY_1_Y, Z_PROBE_ALLEN_KEY_DEPLOY_1_Z };
162
+      constexpr float deploy_1[] = Z_PROBE_ALLEN_KEY_DEPLOY_1;
172 163
       do_blocking_move_to(deploy_1, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE));
173 164
     #endif
174
-    #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_Z)
175
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_X
176
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X current_position[X_AXIS]
177
-      #endif
178
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_Y
179
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y current_position[Y_AXIS]
180
-      #endif
181
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
182
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z current_position[Z_AXIS]
183
-      #endif
165
+    #ifdef Z_PROBE_ALLEN_KEY_DEPLOY_2
184 166
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE
185 167
         #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE 0.0
186 168
       #endif
187
-      const float deploy_2[] = { Z_PROBE_ALLEN_KEY_DEPLOY_2_X, Z_PROBE_ALLEN_KEY_DEPLOY_2_Y, Z_PROBE_ALLEN_KEY_DEPLOY_2_Z };
169
+      constexpr float deploy_2[] = Z_PROBE_ALLEN_KEY_DEPLOY_2;
188 170
       do_blocking_move_to(deploy_2, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE));
189 171
     #endif
190
-    #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_Z)
191
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_X
192
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X current_position[X_AXIS]
193
-      #endif
194
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_Y
195
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y current_position[Y_AXIS]
196
-      #endif
197
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_Z
198
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z current_position[Z_AXIS]
199
-      #endif
172
+    #ifdef Z_PROBE_ALLEN_KEY_DEPLOY_3
200 173
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE
201 174
         #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE 0.0
202 175
       #endif
203
-      const float deploy_3[] = { Z_PROBE_ALLEN_KEY_DEPLOY_3_X, Z_PROBE_ALLEN_KEY_DEPLOY_3_Y, Z_PROBE_ALLEN_KEY_DEPLOY_3_Z };
176
+      constexpr float deploy_3[] = Z_PROBE_ALLEN_KEY_DEPLOY_3;
204 177
       do_blocking_move_to(deploy_3, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE));
205 178
     #endif
206
-    #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_Z)
207
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_X
208
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_4_X current_position[X_AXIS]
209
-      #endif
210
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_Y
211
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_4_Y current_position[Y_AXIS]
212
-      #endif
213
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_Z
214
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_4_Z current_position[Z_AXIS]
215
-      #endif
179
+    #ifdef Z_PROBE_ALLEN_KEY_DEPLOY_4
216 180
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE
217 181
         #define Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE 0.0
218 182
       #endif
219
-      const float deploy_4[] = { Z_PROBE_ALLEN_KEY_DEPLOY_4_X, Z_PROBE_ALLEN_KEY_DEPLOY_4_Y, Z_PROBE_ALLEN_KEY_DEPLOY_4_Z };
183
+      constexpr float deploy_4[] = Z_PROBE_ALLEN_KEY_DEPLOY_4;
220 184
       do_blocking_move_to(deploy_4, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE));
221 185
     #endif
222
-    #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_Z)
223
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_X
224
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_5_X current_position[X_AXIS]
225
-      #endif
226
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_Y
227
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_5_Y current_position[Y_AXIS]
228
-      #endif
229
-      #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_Z
230
-        #define Z_PROBE_ALLEN_KEY_DEPLOY_5_Z current_position[Z_AXIS]
231
-      #endif
186
+    #ifdef Z_PROBE_ALLEN_KEY_DEPLOY_5
232 187
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE
233 188
         #define Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE 0.0
234 189
       #endif
235
-      const float deploy_5[] = { Z_PROBE_ALLEN_KEY_DEPLOY_5_X, Z_PROBE_ALLEN_KEY_DEPLOY_5_Y, Z_PROBE_ALLEN_KEY_DEPLOY_5_Z };
190
+      constexpr float deploy_5[] = Z_PROBE_ALLEN_KEY_DEPLOY_5;
236 191
       do_blocking_move_to(deploy_5, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE));
237 192
     #endif
238 193
   }
239 194
 
240 195
   void run_stow_moves_script() {
241
-    #if defined(Z_PROBE_ALLEN_KEY_STOW_1_X) || defined(Z_PROBE_ALLEN_KEY_STOW_1_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_1_Z)
242
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_1_X
243
-        #define Z_PROBE_ALLEN_KEY_STOW_1_X current_position[X_AXIS]
244
-      #endif
245
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_1_Y
246
-        #define Z_PROBE_ALLEN_KEY_STOW_1_Y current_position[Y_AXIS]
247
-      #endif
248
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_1_Z
249
-        #define Z_PROBE_ALLEN_KEY_STOW_1_Z current_position[Z_AXIS]
250
-      #endif
196
+    #ifdef Z_PROBE_ALLEN_KEY_STOW_1
251 197
       #ifndef Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE
252 198
         #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE 0.0
253 199
       #endif
254
-      const float stow_1[] = { Z_PROBE_ALLEN_KEY_STOW_1_X, Z_PROBE_ALLEN_KEY_STOW_1_Y, Z_PROBE_ALLEN_KEY_STOW_1_Z };
200
+      constexpr float stow_1[] = Z_PROBE_ALLEN_KEY_STOW_1;
255 201
       do_blocking_move_to(stow_1, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE));
256 202
     #endif
257
-    #if defined(Z_PROBE_ALLEN_KEY_STOW_2_X) || defined(Z_PROBE_ALLEN_KEY_STOW_2_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_2_Z)
258
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_2_X
259
-        #define Z_PROBE_ALLEN_KEY_STOW_2_X current_position[X_AXIS]
260
-      #endif
261
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_2_Y
262
-        #define Z_PROBE_ALLEN_KEY_STOW_2_Y current_position[Y_AXIS]
263
-      #endif
264
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_2_Z
265
-        #define Z_PROBE_ALLEN_KEY_STOW_2_Z current_position[Z_AXIS]
266
-      #endif
203
+    #ifdef Z_PROBE_ALLEN_KEY_STOW_2
267 204
       #ifndef Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE
268 205
         #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE 0.0
269 206
       #endif
270
-      const float stow_2[] = { Z_PROBE_ALLEN_KEY_STOW_2_X, Z_PROBE_ALLEN_KEY_STOW_2_Y, Z_PROBE_ALLEN_KEY_STOW_2_Z };
207
+      constexpr float stow_2[] = Z_PROBE_ALLEN_KEY_STOW_2;
271 208
       do_blocking_move_to(stow_2, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE));
272 209
     #endif
273
-    #if defined(Z_PROBE_ALLEN_KEY_STOW_3_X) || defined(Z_PROBE_ALLEN_KEY_STOW_3_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_3_Z)
274
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_3_X
275
-        #define Z_PROBE_ALLEN_KEY_STOW_3_X current_position[X_AXIS]
276
-      #endif
277
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_3_Y
278
-        #define Z_PROBE_ALLEN_KEY_STOW_3_Y current_position[Y_AXIS]
279
-      #endif
280
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_3_Z
281
-        #define Z_PROBE_ALLEN_KEY_STOW_3_Z current_position[Z_AXIS]
282
-      #endif
210
+    #ifdef Z_PROBE_ALLEN_KEY_STOW_3
283 211
       #ifndef Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE
284 212
         #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE 0.0
285 213
       #endif
286
-      const float stow_3[] = { Z_PROBE_ALLEN_KEY_STOW_3_X, Z_PROBE_ALLEN_KEY_STOW_3_Y, Z_PROBE_ALLEN_KEY_STOW_3_Z };
214
+      constexpr float stow_3[] = Z_PROBE_ALLEN_KEY_STOW_3;
287 215
       do_blocking_move_to(stow_3, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE));
288 216
     #endif
289
-    #if defined(Z_PROBE_ALLEN_KEY_STOW_4_X) || defined(Z_PROBE_ALLEN_KEY_STOW_4_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_4_Z)
290
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_4_X
291
-        #define Z_PROBE_ALLEN_KEY_STOW_4_X current_position[X_AXIS]
292
-      #endif
293
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_4_Y
294
-        #define Z_PROBE_ALLEN_KEY_STOW_4_Y current_position[Y_AXIS]
295
-      #endif
296
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_4_Z
297
-        #define Z_PROBE_ALLEN_KEY_STOW_4_Z current_position[Z_AXIS]
298
-      #endif
217
+    #ifdef Z_PROBE_ALLEN_KEY_STOW_4
299 218
       #ifndef Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE
300 219
         #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE 0.0
301 220
       #endif
302
-      const float stow_4[] = { Z_PROBE_ALLEN_KEY_STOW_4_X, Z_PROBE_ALLEN_KEY_STOW_4_Y, Z_PROBE_ALLEN_KEY_STOW_4_Z };
221
+      constexpr float stow_4[] = Z_PROBE_ALLEN_KEY_STOW_4;
303 222
       do_blocking_move_to(stow_4, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE));
304 223
     #endif
305
-    #if defined(Z_PROBE_ALLEN_KEY_STOW_5_X) || defined(Z_PROBE_ALLEN_KEY_STOW_5_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_5_Z)
306
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_5_X
307
-        #define Z_PROBE_ALLEN_KEY_STOW_5_X current_position[X_AXIS]
308
-      #endif
309
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_5_Y
310
-        #define Z_PROBE_ALLEN_KEY_STOW_5_Y current_position[Y_AXIS]
311
-      #endif
312
-      #ifndef Z_PROBE_ALLEN_KEY_STOW_5_Z
313
-        #define Z_PROBE_ALLEN_KEY_STOW_5_Z current_position[Z_AXIS]
314
-      #endif
224
+    #ifdef Z_PROBE_ALLEN_KEY_STOW_5
315 225
       #ifndef Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE
316 226
         #define Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE 0.0
317 227
       #endif
318
-      const float stow_5[] = { Z_PROBE_ALLEN_KEY_STOW_5_X, Z_PROBE_ALLEN_KEY_STOW_5_Y, Z_PROBE_ALLEN_KEY_STOW_5_Z };
228
+      constexpr float stow_5[] = Z_PROBE_ALLEN_KEY_STOW_5;
319 229
       do_blocking_move_to(stow_5, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE));
320 230
     #endif
321 231
   }
@@ -741,7 +651,7 @@ static float run_z_probe() {
741 651
 
742 652
     #endif
743 653
 
744
-    const float measured_z = probes_total * (1.0f / (MULTIPLE_PROBING));
654
+    const float measured_z = probes_total * RECIPROCAL(MULTIPLE_PROBING);
745 655
 
746 656
   #elif TOTAL_PROBING == 2
747 657
 

+ 20
- 19
Marlin/src/module/stepper.cpp Переглянути файл

@@ -174,8 +174,8 @@ int32_t Stepper::delta_error[XYZE] = { 0 };
174 174
 uint32_t Stepper::advance_dividend[XYZE] = { 0 },
175 175
          Stepper::advance_divisor = 0,
176 176
          Stepper::step_events_completed = 0, // The number of step events executed in the current block
177
-         Stepper::accelerate_until,          // The point from where we need to stop acceleration
178
-         Stepper::decelerate_after,          // The point from where we need to start decelerating
177
+         Stepper::accelerate_until,          // The count at which to stop accelerating
178
+         Stepper::decelerate_after,          // The count at which to start decelerating
179 179
          Stepper::step_event_count;          // The total event count for the current block
180 180
 
181 181
 #if EXTRUDERS > 1 || ENABLED(MIXING_EXTRUDER)
@@ -2239,19 +2239,16 @@ void Stepper::endstop_triggered(const AxisEnum axis) {
2239 2239
 
2240 2240
   const bool was_enabled = STEPPER_ISR_ENABLED();
2241 2241
   if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
2242
-
2243
-  #if IS_CORE
2244
-
2245
-    endstops_trigsteps[axis] = 0.5f * (
2246
-      axis == CORE_AXIS_2 ? CORESIGN(count_position[CORE_AXIS_1] - count_position[CORE_AXIS_2])
2247
-                          : count_position[CORE_AXIS_1] + count_position[CORE_AXIS_2]
2248
-    );
2249
-
2250
-  #else // !COREXY && !COREXZ && !COREYZ
2251
-
2252
-    endstops_trigsteps[axis] = count_position[axis];
2253
-
2254
-  #endif // !COREXY && !COREXZ && !COREYZ
2242
+  endstops_trigsteps[axis] = (
2243
+    #if IS_CORE
2244
+      (axis == CORE_AXIS_2
2245
+        ? CORESIGN(count_position[CORE_AXIS_1] - count_position[CORE_AXIS_2])
2246
+        : count_position[CORE_AXIS_1] + count_position[CORE_AXIS_2]
2247
+      ) * 0.5f
2248
+    #else // !IS_CORE
2249
+      count_position[axis]
2250
+    #endif
2251
+  );
2255 2252
 
2256 2253
   // Discard the rest of the move if there is a current block
2257 2254
   quick_stop();
@@ -2279,15 +2276,19 @@ int32_t Stepper::triggered_position(const AxisEnum axis) {
2279 2276
 
2280 2277
 void Stepper::report_positions() {
2281 2278
 
2282
-  // Protect the access to the position.
2283
-  const bool was_enabled = STEPPER_ISR_ENABLED();
2284
-  if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
2279
+  #ifdef __AVR__
2280
+    // Protect the access to the position.
2281
+    const bool was_enabled = STEPPER_ISR_ENABLED();
2282
+    if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
2283
+  #endif
2285 2284
 
2286 2285
   const int32_t xpos = count_position[X_AXIS],
2287 2286
                 ypos = count_position[Y_AXIS],
2288 2287
                 zpos = count_position[Z_AXIS];
2289 2288
 
2290
-  if (was_enabled) ENABLE_STEPPER_DRIVER_INTERRUPT();
2289
+  #ifdef __AVR__
2290
+    if (was_enabled) ENABLE_STEPPER_DRIVER_INTERRUPT();
2291
+  #endif
2291 2292
 
2292 2293
   #if CORE_IS_XY || CORE_IS_XZ || ENABLED(DELTA) || IS_SCARA
2293 2294
     SERIAL_ECHOPGM(MSG_COUNT_A);

+ 3
- 0
Marlin/src/module/stepper.h Переглянути файл

@@ -321,6 +321,9 @@ class Stepper {
321 321
       static uint32_t acc_step_rate; // needed for deceleration start point
322 322
     #endif
323 323
 
324
+    //
325
+    // Exact steps at which an endstop was triggered
326
+    //
324 327
     static volatile int32_t endstops_trigsteps[XYZ];
325 328
 
326 329
     //

+ 13
- 12
Marlin/src/module/temperature.cpp Переглянути файл

@@ -1320,13 +1320,14 @@ void Temperature::manage_heater() {
1320 1320
 
1321 1321
     if (!WITHIN(t_index, 0, COUNT(user_thermistor) - 1)) return 25;
1322 1322
 
1323
-    if (user_thermistor[t_index].pre_calc) {
1324
-      // pre-calculate some variables
1325
-      user_thermistor[t_index].pre_calc = false;
1326
-      user_thermistor[t_index].res_25_recip = 1.0f / user_thermistor[t_index].res_25;
1327
-      user_thermistor[t_index].res_25_log = logf(user_thermistor[t_index].res_25);
1328
-      user_thermistor[t_index].beta_recip = 1.0f / user_thermistor[t_index].beta;
1329
-      user_thermistor[t_index].sh_alpha = (1.0f / (THERMISTOR_RESISTANCE_NOMINAL_C - THERMISTOR_ABS_ZERO_C)) - (user_thermistor[t_index].beta_recip * user_thermistor[t_index].res_25_log) - (user_thermistor[t_index].sh_c_coeff * user_thermistor[t_index].res_25_log * user_thermistor[t_index].res_25_log * user_thermistor[t_index].res_25_log);
1323
+    user_thermistor_t &t = user_thermistor[t_index];
1324
+    if (t.pre_calc) { // pre-calculate some variables
1325
+      t.pre_calc     = false;
1326
+      t.res_25_recip = 1.0f / t.res_25;
1327
+      t.res_25_log   = logf(t.res_25);
1328
+      t.beta_recip   = 1.0f / t.beta;
1329
+      t.sh_alpha     = RECIPROCAL(THERMISTOR_RESISTANCE_NOMINAL_C - (THERMISTOR_ABS_ZERO_C))
1330
+                        - (t.beta_recip * t.res_25_log) - (t.sh_c_coeff * cu(t.res_25_log));
1330 1331
     }
1331 1332
 
1332 1333
     // maximum adc value .. take into account the over sampling
@@ -1334,13 +1335,13 @@ void Temperature::manage_heater() {
1334 1335
               adc_raw = constrain(raw, 1, adc_max - 1); // constrain to prevent divide-by-zero
1335 1336
 
1336 1337
     const float adc_inverse = (adc_max - adc_raw) - 0.5f,
1337
-                resistance = user_thermistor[t_index].series_res * (adc_raw + 0.5f) / adc_inverse,
1338
+                resistance = t.series_res * (adc_raw + 0.5f) / adc_inverse,
1338 1339
                 log_resistance = logf(resistance);
1339 1340
 
1340
-    float value = user_thermistor[t_index].sh_alpha;
1341
-    value += log_resistance * user_thermistor[t_index].beta_recip;
1342
-    if (user_thermistor[t_index].sh_c_coeff != 0)
1343
-      value += user_thermistor[t_index].sh_c_coeff * log_resistance * log_resistance * log_resistance;
1341
+    float value = t.sh_alpha;
1342
+    value += log_resistance * t.beta_recip;
1343
+    if (t.sh_c_coeff != 0)
1344
+      value += t.sh_c_coeff * cu(log_resistance);
1344 1345
     value = 1.0f / value;
1345 1346
 
1346 1347
     //#if (MOTHERBOARD == BOARD_RAMPS_14_EFB)

+ 29
- 28
Marlin/src/module/tool_change.cpp Переглянути файл

@@ -133,9 +133,11 @@
133 133
 
134 134
 #endif // SWITCHING_NOZZLE
135 135
 
136
-inline void fast_line_to_current(const AxisEnum fr_axis) {
137
-  planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[fr_axis], active_extruder);
136
+inline void _line_to_current(const AxisEnum fr_axis, const float fscale=1.0f) {
137
+  planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[fr_axis] * fscale, active_extruder);
138 138
 }
139
+inline void slow_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.5f); }
140
+inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis); }
139 141
 
140 142
 #if ENABLED(MAGNETIC_PARKING_EXTRUDER)
141 143
 
@@ -150,13 +152,11 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
150 152
 
151 153
     const float oldx = current_position[X_AXIS],
152 154
                 grabpos = mpe_settings.parking_xpos[new_tool] + (new_tool ? mpe_settings.grab_distance : -mpe_settings.grab_distance),
153
-                offsetcompensation =
155
+                offsetcompensation = (0
154 156
                   #if HAS_HOTEND_OFFSET
155
-                    hotend_offset[X_AXIS][active_extruder] * mpe_settings.compensation_factor
156
-                  #else
157
-                    0
157
+                    + hotend_offset[X_AXIS][active_extruder] * mpe_settings.compensation_factor
158 158
                   #endif
159
-              ;
159
+                );
160 160
 
161 161
     if (axis_unhomed_error(true, false, false)) return;
162 162
 
@@ -337,7 +337,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
337 337
         planner.synchronize();
338 338
         DEBUG_POS("(5) Unpark extruder", current_position);
339 339
       }
340
-      planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS] * 0.5, active_extruder);
340
+      slow_line_to_current(X_AXIS);
341 341
 
342 342
       // STEP 6
343 343
 
@@ -411,7 +411,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
411 411
 
412 412
     current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS;
413 413
     if (DEBUGGING(LEVELING)) DEBUG_POS("Move Y SwitchPos", current_position);
414
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5f, active_extruder);
414
+    slow_line_to_current(Y_AXIS);
415 415
 
416 416
     // Wait for move to complete, then another 0.2s
417 417
     planner.synchronize();
@@ -446,7 +446,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
446 446
       DEBUG_ECHOLNPGM("(4) Grab and lock new toolhead");
447 447
       DEBUG_POS("Move Y SwitchPos", current_position);
448 448
     }
449
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5, active_extruder);
449
+    slow_line_to_current(Y_AXIS);
450 450
 
451 451
     // Wait for move to finish, pause 0.2s, move servo, pause 0.5s
452 452
     planner.synchronize();
@@ -491,21 +491,21 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
491 491
       SERIAL_ECHOLNPAIR("(1) Place old tool ", int(active_extruder));
492 492
       DEBUG_POS("Move Y SwitchPos + Security", current_position);
493 493
     }
494
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS], active_extruder);
494
+    fast_line_to_current(Y_AXIS);
495 495
 
496 496
     current_position[X_AXIS] = placexclear;
497 497
     if (DEBUGGING(LEVELING)) {
498 498
       planner.synchronize();
499 499
       DEBUG_POS("Move X SwitchPos + Security", current_position);
500 500
     }
501
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], active_extruder);
501
+    fast_line_to_current(X_AXIS);
502 502
 
503 503
     current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS;
504 504
     if (DEBUGGING(LEVELING)) {
505 505
       planner.synchronize();
506 506
       DEBUG_POS("Move Y SwitchPos", current_position);
507 507
     }
508
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS], active_extruder);
508
+    fast_line_to_current(Y_AXIS);
509 509
 
510 510
     current_position[X_AXIS] = placexpos;
511 511
     if (DEBUGGING(LEVELING)) {
@@ -541,7 +541,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
541 541
 
542 542
     current_position[X_AXIS] = grabxpos;
543 543
     if (DEBUGGING(LEVELING)) DEBUG_POS("Move to new toolhead X", current_position);
544
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], active_extruder);
544
+    fast_line_to_current(X_AXIS);
545 545
 
546 546
     // 4. Grab the new toolhead and move to security position
547 547
 
@@ -559,7 +559,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
559 559
       planner.synchronize();
560 560
       DEBUG_POS("Move Y SwitchPos", current_position);
561 561
     }
562
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.2, active_extruder);
562
+    _line_to_current(Y_AXIS, 0.2f);
563 563
 
564 564
     #if ENABLED(PRIME_BEFORE_REMOVE) && (SWITCHING_TOOLHEAD_PRIME_MM || SWITCHING_TOOLHEAD_RETRACT_MM)
565 565
       #if SWITCHING_TOOLHEAD_PRIME_MM
@@ -577,13 +577,13 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
577 577
 
578 578
     current_position[X_AXIS] = grabxclear;
579 579
     if (DEBUGGING(LEVELING)) DEBUG_POS("Move to new toolhead X + Security", current_position);
580
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS] * 0.1, active_extruder);
580
+    _line_to_current(X_AXIS, 0.1f);
581 581
     planner.synchronize();
582 582
     safe_delay(100); // Give switch time to settle
583 583
 
584 584
     current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
585 585
     if (DEBUGGING(LEVELING)) DEBUG_POS("Move back Y clear", current_position);
586
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS], active_extruder); // move away from docked toolhead
586
+    fast_line_to_current(Y_AXIS); // move away from docked toolhead
587 587
     planner.synchronize(); // Always sync last tool-change move
588 588
 
589 589
     if (DEBUGGING(LEVELING)) DEBUG_POS("MST Tool-Change done.", current_position);
@@ -620,7 +620,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
620 620
 
621 621
     current_position[Z_AXIS] += SWITCHING_TOOLHEAD_Z_HOP;
622 622
     if (DEBUGGING(LEVELING)) DEBUG_POS("(1) Raise Z-Axis ", current_position);
623
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Z_AXIS], active_extruder);
623
+    fast_line_to_current(Z_AXIS);
624 624
 
625 625
     // 2. Move to position near active extruder parking
626 626
 
@@ -629,9 +629,9 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
629 629
       SERIAL_ECHOLNPAIR("(2) Move near active extruder parking", active_extruder);
630 630
       DEBUG_POS("Moving ParkPos", current_position);
631 631
     }
632
-    current_position[X_AXIS] = placexpos + hotend_offset[X_AXIS][active_extruder];
633
-    current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR + hotend_offset[Y_AXIS][active_extruder];
634
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], active_extruder);
632
+    current_position[X_AXIS] = hotend_offset[X_AXIS][active_extruder] + placexpos;
633
+    current_position[Y_AXIS] = hotend_offset[Y_AXIS][active_extruder] + SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR;
634
+    fast_line_to_current(X_AXIS);
635 635
 
636 636
     // 3. Move gently to park position of active extruder
637 637
 
@@ -642,7 +642,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
642 642
     }
643 643
 
644 644
     current_position[Y_AXIS] -= SWITCHING_TOOLHEAD_Y_CLEAR;
645
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5, active_extruder);
645
+    slow_line_to_current(Y_AXIS);
646 646
 
647 647
     // 4. Disengage magnetic field, wait for delay
648 648
 
@@ -658,10 +658,11 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
658 658
     }
659 659
 
660 660
     current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
661
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5f, active_extruder);
662
-    current_position[X_AXIS] = grabxpos + hotend_offset[X_AXIS][active_extruder];
663
-    current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR  + hotend_offset[Y_AXIS][active_extruder];
664
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], active_extruder);
661
+    slow_line_to_current(Y_AXIS);
662
+
663
+    current_position[X_AXIS] = hotend_offset[X_AXIS][active_extruder] + grabxpos;
664
+    current_position[Y_AXIS] = hotend_offset[Y_AXIS][active_extruder] + SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR;
665
+    fast_line_to_current(X_AXIS);
665 666
 
666 667
     // 6. Move gently to park position of new extruder
667 668
 
@@ -670,7 +671,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
670 671
       planner.synchronize();
671 672
       DEBUG_ECHOLNPGM("(6) Move near new extruder");
672 673
     }
673
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5f, active_extruder);
674
+    slow_line_to_current(Y_AXIS);
674 675
 
675 676
     // 7. Engage magnetic field for new extruder parking
676 677
 
@@ -682,7 +683,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
682 683
 
683 684
     current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
684 685
     if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("(8) Unpark extruder");
685
-    planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS] * 0.5f, active_extruder);
686
+    slow_line_to_current(X_AXIS);
686 687
     planner.synchronize(); // Always sync the final move
687 688
 
688 689
     // 9. Apply Z hotend offset to current position

+ 7
- 21
config/examples/delta/Anycubic/Kossel/Configuration.h Переглянути файл

@@ -1028,39 +1028,25 @@
1028 1028
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
1029 1029
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
1030 1030
 
1031
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0
1032
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS
1033
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
1031
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
1034 1032
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
1035 1033
 
1036
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0
1037
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS
1038
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0
1034
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
1039 1035
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
1040 1036
 
1041
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75
1042
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75
1043
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
1037
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
1044 1038
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
1045 1039
 
1046
-  #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
1047
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
1048
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
1040
+  #define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
1049 1041
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
1050 1042
 
1051
-  #define Z_PROBE_ALLEN_KEY_STOW_2_X -64.0 // Push it down
1052
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Y 56.0
1053
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Z 3.0
1043
+  #define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 3.0 } // Push it down
1054 1044
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
1055 1045
 
1056
-  #define Z_PROBE_ALLEN_KEY_STOW_3_X -64.0 // Move it up to clear
1057
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Y 56.0
1058
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Z 50.0
1046
+  #define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 50.0 } // Move it up to clear
1059 1047
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
1060 1048
 
1061
-  #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0
1062
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0
1063
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z
1049
+  #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 50.0 }
1064 1050
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1065 1051
 
1066 1052
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/Dreammaker/Overlord/Configuration.h Переглянути файл

@@ -973,39 +973,25 @@
973 973
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
974 974
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
975 975
 
976
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0
977
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS
978
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
976
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
979 977
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
980 978
 
981
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0
982
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS
983
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0
979
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
984 980
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
985 981
 
986
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75
987
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75
988
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
982
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
989 983
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
990 984
 
991
-  #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
992
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
993
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
985
+  #define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
994 986
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
995 987
 
996
-  #define Z_PROBE_ALLEN_KEY_STOW_2_X -64.0 // Push it down
997
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Y 56.0
998
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Z 3.0
988
+  #define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 3.0 } // Push it down
999 989
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
1000 990
 
1001
-  #define Z_PROBE_ALLEN_KEY_STOW_3_X -64.0 // Move it up to clear
1002
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Y 56.0
1003
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Z 50.0
991
+  #define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 50.0 } // Move it up to clear
1004 992
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
1005 993
 
1006
-  #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0
1007
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0
1008
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z
994
+  #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 50.0 }
1009 995
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1010 996
 
1011 997
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/Dreammaker/Overlord_Pro/Configuration.h Переглянути файл

@@ -985,39 +985,25 @@
985 985
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
986 986
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
987 987
 
988
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0
989
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS
990
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
988
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
991 989
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
992 990
 
993
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0
994
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS
995
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0
991
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
996 992
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
997 993
 
998
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75
999
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75
1000
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
994
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
1001 995
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
1002 996
 
1003
-  #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
1004
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
1005
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
997
+  #define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
1006 998
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
1007 999
 
1008
-  #define Z_PROBE_ALLEN_KEY_STOW_2_X -64.0 // Push it down
1009
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Y 56.0
1010
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Z 3.0
1000
+  #define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 3.0 } // Push it down
1011 1001
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
1012 1002
 
1013
-  #define Z_PROBE_ALLEN_KEY_STOW_3_X -64.0 // Move it up to clear
1014
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Y 56.0
1015
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Z 50.0
1003
+  #define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 50.0 } // Move it up to clear
1016 1004
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
1017 1005
 
1018
-  #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0
1019
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0
1020
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z
1006
+  #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 50.0 }
1021 1007
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1022 1008
 
1023 1009
 #endif // Z_PROBE_ALLEN_KEY

+ 10
- 24
config/examples/delta/FLSUN/auto_calibrate/Configuration.h Переглянути файл

@@ -975,41 +975,27 @@
975 975
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
976 976
 
977 977
   // Kossel Mini
978
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0
979
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS
980
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
978
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
981 979
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
982 980
 
983
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0
984
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS
985
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0
981
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
986 982
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
987 983
 
988
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75
989
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75
990
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
984
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
991 985
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
992 986
 
993 987
   #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
994 988
   // Move the probe into position
995
-  #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0
996
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
997
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
989
+  #define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 }
998 990
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
999 991
   // Move the nozzle down further to push the probe into retracted position.
1000
-  #define Z_PROBE_ALLEN_KEY_STOW_2_X  Z_PROBE_ALLEN_KEY_STOW_1_X
1001
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Y  Z_PROBE_ALLEN_KEY_STOW_1_Y
1002
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Z  (Z_PROBE_ALLEN_KEY_STOW_1_Z-Z_PROBE_ALLEN_KEY_STOW_DEPTH)
1003
-  #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED/10)
992
+  #define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 23.0-(Z_PROBE_ALLEN_KEY_STOW_DEPTH) }
993
+  #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
1004 994
   // Raise things back up slightly so we don't bump into anything
1005
-  #define Z_PROBE_ALLEN_KEY_STOW_3_X  Z_PROBE_ALLEN_KEY_STOW_2_X
1006
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Y  Z_PROBE_ALLEN_KEY_STOW_2_Y
1007
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Z  (Z_PROBE_ALLEN_KEY_STOW_1_Z+Z_PROBE_ALLEN_KEY_STOW_DEPTH)
1008
-  #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE (XY_PROBE_SPEED/2)
1009
-
1010
-  #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0
1011
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0
1012
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z
995
+  #define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 23.0+(Z_PROBE_ALLEN_KEY_STOW_DEPTH) }
996
+  #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE (XY_PROBE_SPEED)/2
997
+
998
+  #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 23.0+(Z_PROBE_ALLEN_KEY_STOW_DEPTH) }
1013 999
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1014 1000
 
1015 1001
 #endif // Z_PROBE_ALLEN_KEY

+ 10
- 24
config/examples/delta/FLSUN/kossel/Configuration.h Переглянути файл

@@ -975,40 +975,26 @@
975 975
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
976 976
 
977 977
   // Kossel Mini
978
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0
979
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS
980
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
978
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
981 979
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
982 980
 
983
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0
984
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS
985
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0
981
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
986 982
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
987 983
 
988
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75
989
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75
990
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
984
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
991 985
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
992 986
 
993 987
   #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
994
-  #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
995
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
996
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
988
+  #define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
997 989
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
998 990
   // Move the nozzle down further to push the probe into retracted position.
999
-  #define Z_PROBE_ALLEN_KEY_STOW_2_X  Z_PROBE_ALLEN_KEY_STOW_1_X
1000
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Y  Z_PROBE_ALLEN_KEY_STOW_1_Y
1001
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Z  (Z_PROBE_ALLEN_KEY_STOW_1_Z-Z_PROBE_ALLEN_KEY_STOW_DEPTH)
1002
-  #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED/10)
991
+  #define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 23.0-(Z_PROBE_ALLEN_KEY_STOW_DEPTH) }
992
+  #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
1003 993
   // Raise things back up slightly so we don't bump into anything
1004
-  #define Z_PROBE_ALLEN_KEY_STOW_3_X  Z_PROBE_ALLEN_KEY_STOW_2_X
1005
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Y  Z_PROBE_ALLEN_KEY_STOW_2_Y
1006
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Z  (Z_PROBE_ALLEN_KEY_STOW_1_Z+Z_PROBE_ALLEN_KEY_STOW_DEPTH)
1007
-  #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE (XY_PROBE_SPEED/2)
1008
-
1009
-  #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0
1010
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0
1011
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z
994
+  #define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 23.0+(Z_PROBE_ALLEN_KEY_STOW_DEPTH) }
995
+  #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE (XY_PROBE_SPEED)/2
996
+
997
+  #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 23.0+(Z_PROBE_ALLEN_KEY_STOW_DEPTH) }
1012 998
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1013 999
 
1014 1000
 #endif // Z_PROBE_ALLEN_KEY

+ 11
- 25
config/examples/delta/FLSUN/kossel_mini/Configuration.h Переглянути файл

@@ -975,40 +975,26 @@
975 975
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
976 976
 
977 977
   // Kossel Mini
978
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0
979
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS
980
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
978
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
981 979
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
982 980
 
983
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0
984
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS
985
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0
986
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED/10)
981
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
982
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
987 983
 
988
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75
989
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75
990
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
984
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
991 985
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
992 986
 
993 987
   #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
994
-  #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
995
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
996
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
988
+  #define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
997 989
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
998 990
   // Move the nozzle down further to push the probe into retracted position.
999
-  #define Z_PROBE_ALLEN_KEY_STOW_2_X  Z_PROBE_ALLEN_KEY_STOW_1_X
1000
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Y  Z_PROBE_ALLEN_KEY_STOW_1_Y
1001
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Z  (Z_PROBE_ALLEN_KEY_STOW_1_Z-Z_PROBE_ALLEN_KEY_STOW_DEPTH)
1002
-  #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED/10)
991
+  #define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 23.0-(Z_PROBE_ALLEN_KEY_STOW_DEPTH) }
992
+  #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
1003 993
   // Raise things back up slightly so we don't bump into anything
1004
-  #define Z_PROBE_ALLEN_KEY_STOW_3_X  Z_PROBE_ALLEN_KEY_STOW_2_X
1005
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Y  Z_PROBE_ALLEN_KEY_STOW_2_Y
1006
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Z  (Z_PROBE_ALLEN_KEY_STOW_1_Z+Z_PROBE_ALLEN_KEY_STOW_DEPTH)
1007
-  #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE (XY_PROBE_SPEED/2)
1008
-
1009
-  #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0
1010
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0
1011
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z
994
+  #define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 23.0+(Z_PROBE_ALLEN_KEY_STOW_DEPTH) }
995
+  #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE (XY_PROBE_SPEED)/2
996
+
997
+  #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 23.0+(Z_PROBE_ALLEN_KEY_STOW_DEPTH) }
1012 998
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1013 999
 
1014 1000
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/Geeetech/Rostock 301/Configuration.h Переглянути файл

@@ -964,39 +964,25 @@
964 964
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
965 965
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
966 966
 
967
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0
968
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS
969
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
967
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
970 968
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
971 969
 
972
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0
973
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS
974
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0
970
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
975 971
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
976 972
 
977
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75
978
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75
979
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
973
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
980 974
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
981 975
 
982
-  #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
983
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
984
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
976
+  #define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
985 977
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
986 978
 
987
-  #define Z_PROBE_ALLEN_KEY_STOW_2_X -64.0 // Push it down
988
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Y 56.0
989
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Z 3.0
979
+  #define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 3.0 } // Push it down
990 980
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
991 981
 
992
-  #define Z_PROBE_ALLEN_KEY_STOW_3_X -64.0 // Move it up to clear
993
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Y 56.0
994
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Z 50.0
982
+  #define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 50.0 } // Move it up to clear
995 983
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
996 984
 
997
-  #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0
998
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0
999
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z
985
+  #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 50.0 }
1000 986
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1001 987
 
1002 988
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/Hatchbox_Alpha/Configuration.h Переглянути файл

@@ -979,39 +979,25 @@
979 979
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
980 980
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
981 981
 
982
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0
983
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS
984
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
982
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
985 983
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
986 984
 
987
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0
988
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS
989
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0
985
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
990 986
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
991 987
 
992
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75
993
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75
994
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
988
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
995 989
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
996 990
 
997
-  #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
998
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
999
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
991
+  #define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
1000 992
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
1001 993
 
1002
-  #define Z_PROBE_ALLEN_KEY_STOW_2_X -64.0 // Push it down
1003
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Y 56.0
1004
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Z 3.0
994
+  #define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 3.0 } // Push it down
1005 995
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
1006 996
 
1007
-  #define Z_PROBE_ALLEN_KEY_STOW_3_X -64.0 // Move it up to clear
1008
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Y 56.0
1009
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Z 50.0
997
+  #define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 50.0 } // Move it up to clear
1010 998
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
1011 999
 
1012
-  #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0
1013
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0
1014
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z
1000
+  #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 50.0 }
1015 1001
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1016 1002
 
1017 1003
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/MKS/SBASE/Configuration.h Переглянути файл

@@ -964,39 +964,25 @@
964 964
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
965 965
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
966 966
 
967
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0
968
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS
969
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
967
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
970 968
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
971 969
 
972
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0
973
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS
974
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0
970
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
975 971
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
976 972
 
977
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75
978
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75
979
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
973
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
980 974
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
981 975
 
982
-  #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
983
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
984
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
976
+  #define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
985 977
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
986 978
 
987
-  #define Z_PROBE_ALLEN_KEY_STOW_2_X -64.0 // Push it down
988
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Y 56.0
989
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Z 3.0
979
+  #define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 3.0 } // Push it down
990 980
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
991 981
 
992
-  #define Z_PROBE_ALLEN_KEY_STOW_3_X -64.0 // Move it up to clear
993
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Y 56.0
994
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Z 50.0
982
+  #define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 50.0 } // Move it up to clear
995 983
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
996 984
 
997
-  #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0
998
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0
999
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z
985
+  #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 50.0 }
1000 986
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1001 987
 
1002 988
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/Tevo Little Monster/Configuration.h Переглянути файл

@@ -968,39 +968,25 @@
968 968
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
969 969
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
970 970
 
971
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0
972
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS
973
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
971
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
974 972
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
975 973
 
976
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0
977
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS
978
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0
974
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
979 975
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
980 976
 
981
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75
982
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75
983
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
977
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
984 978
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
985 979
 
986
-  #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
987
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
988
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
980
+  #define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
989 981
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
990 982
 
991
-  #define Z_PROBE_ALLEN_KEY_STOW_2_X -64.0 // Push it down
992
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Y 56.0
993
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Z 3.0
983
+  #define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 3.0 } // Push it down
994 984
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
995 985
 
996
-  #define Z_PROBE_ALLEN_KEY_STOW_3_X -64.0 // Move it up to clear
997
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Y 56.0
998
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Z 50.0
986
+  #define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 50.0 } // Move it up to clear
999 987
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
1000 988
 
1001
-  #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0
1002
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0
1003
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z
989
+  #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 50.0 }
1004 990
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1005 991
 
1006 992
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/generic/Configuration.h Переглянути файл

@@ -964,39 +964,25 @@
964 964
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
965 965
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
966 966
 
967
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0
968
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS
969
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
967
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
970 968
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
971 969
 
972
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0
973
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS
974
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0
970
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
975 971
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
976 972
 
977
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75
978
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75
979
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
973
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
980 974
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
981 975
 
982
-  #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
983
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
984
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
976
+  #define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
985 977
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
986 978
 
987
-  #define Z_PROBE_ALLEN_KEY_STOW_2_X -64.0 // Push it down
988
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Y 56.0
989
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Z 3.0
979
+  #define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 3.0 } // Push it down
990 980
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
991 981
 
992
-  #define Z_PROBE_ALLEN_KEY_STOW_3_X -64.0 // Move it up to clear
993
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Y 56.0
994
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Z 50.0
982
+  #define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 50.0 } // Move it up to clear
995 983
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
996 984
 
997
-  #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0
998
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0
999
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z
985
+  #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 50.0 }
1000 986
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1001 987
 
1002 988
 #endif // Z_PROBE_ALLEN_KEY

+ 11
- 25
config/examples/delta/kossel_mini/Configuration.h Переглянути файл

@@ -965,40 +965,26 @@
965 965
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
966 966
 
967 967
   // Kossel Mini
968
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0
969
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS
970
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
968
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
971 969
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
972 970
 
973
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0
974
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS
975
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0
976
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED/10)
971
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
972
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
977 973
 
978
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75
979
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75
980
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
974
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
981 975
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
982 976
 
983 977
   #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
984
-  #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
985
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
986
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
978
+  #define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
987 979
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
988 980
   // Move the nozzle down further to push the probe into retracted position.
989
-  #define Z_PROBE_ALLEN_KEY_STOW_2_X  Z_PROBE_ALLEN_KEY_STOW_1_X
990
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Y  Z_PROBE_ALLEN_KEY_STOW_1_Y
991
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Z  (Z_PROBE_ALLEN_KEY_STOW_1_Z-Z_PROBE_ALLEN_KEY_STOW_DEPTH)
992
-  #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED/10)
981
+  #define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 23.0-(Z_PROBE_ALLEN_KEY_STOW_DEPTH) }
982
+  #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
993 983
   // Raise things back up slightly so we don't bump into anything
994
-  #define Z_PROBE_ALLEN_KEY_STOW_3_X  Z_PROBE_ALLEN_KEY_STOW_2_X
995
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Y  Z_PROBE_ALLEN_KEY_STOW_2_Y
996
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Z  (Z_PROBE_ALLEN_KEY_STOW_1_Z+Z_PROBE_ALLEN_KEY_STOW_DEPTH)
997
-  #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE (XY_PROBE_SPEED/2)
998
-
999
-  #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0
1000
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0
1001
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z
984
+  #define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 23.0+(Z_PROBE_ALLEN_KEY_STOW_DEPTH) }
985
+  #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE (XY_PROBE_SPEED)/2
986
+
987
+  #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 23.0+(Z_PROBE_ALLEN_KEY_STOW_DEPTH) }
1002 988
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1003 989
 
1004 990
 #endif // Z_PROBE_ALLEN_KEY

+ 8
- 24
config/examples/delta/kossel_pro/Configuration.h Переглянути файл

@@ -958,44 +958,28 @@
958 958
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
959 959
 
960 960
   // Kossel Pro
961
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X -105.00 // Move left but not quite so far that we'll bump the belt
962
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y 0.00
963
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
961
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { -105.00, 0.00, 100.0 } // Move left but not quite so far that we'll bump the belt
964 962
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
965 963
 
966
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X -110.00 // Move outward to position deploy pin to the left of the arm
967
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y -125.00
968
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z Z_PROBE_ALLEN_KEY_DEPLOY_1_Z
964
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { -110.00, -125.00, 100.0 } // Move outward to position deploy pin to the left of the arm
969 965
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE XY_PROBE_SPEED
970 966
 
971
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75
972
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75
973
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
967
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { -110.00 * 0.75, -125.00 * 0.75, 100.0 }
974 968
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
975 969
 
976
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_4_X 45.00 // Move right to trigger deploy pin
977
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_4_Y -125.00
978
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_4_Z Z_PROBE_ALLEN_KEY_DEPLOY_3_Z
970
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_4 { 45.00, -125.00, 100.0 } // Move right to trigger deploy pin
979 971
   #define Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE (XY_PROBE_SPEED)/2
980 972
 
981
-  #define Z_PROBE_ALLEN_KEY_STOW_1_X 36.00 // Line up with bed retaining clip
982
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Y -125.00
983
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Z 75.0
973
+  #define Z_PROBE_ALLEN_KEY_STOW_1 { 36.00, -125.00, 75.0 } // Line up with bed retaining clip
984 974
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
985 975
 
986
-  #define Z_PROBE_ALLEN_KEY_STOW_2_X Z_PROBE_ALLEN_KEY_STOW_1_X // move down to retract probe
987
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Y Z_PROBE_ALLEN_KEY_STOW_1_Y
988
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Z 0.0
976
+  #define Z_PROBE_ALLEN_KEY_STOW_2 { 36.00, -125.00, 0.0 } // move down to retract probe
989 977
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/2
990 978
 
991
-  #define Z_PROBE_ALLEN_KEY_STOW_3_X 0.0  // return to 0,0,100
992
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Y 0.0
993
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Z 100.0
979
+  #define Z_PROBE_ALLEN_KEY_STOW_3 { 0.0, 0.0, 100.0 } // return to 0,0,100
994 980
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
995 981
 
996
-  #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0
997
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0
998
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z
982
+  #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 100.0 }
999 983
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1000 984
 
1001 985
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/kossel_xl/Configuration.h Переглянути файл

@@ -967,39 +967,25 @@
967 967
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
968 968
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
969 969
 
970
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0
971
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS
972
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
970
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
973 971
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
974 972
 
975
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0
976
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS
977
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0
973
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
978 974
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
979 975
 
980
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75
981
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75
982
-  #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z
976
+  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
983 977
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
984 978
 
985
-  #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
986
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
987
-  #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
979
+  #define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
988 980
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
989 981
 
990
-  #define Z_PROBE_ALLEN_KEY_STOW_2_X -64.0 // Push it down
991
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Y 56.0
992
-  #define Z_PROBE_ALLEN_KEY_STOW_2_Z 3.0
982
+  #define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 3.0 } // Push it down
993 983
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
994 984
 
995
-  #define Z_PROBE_ALLEN_KEY_STOW_3_X -64.0 // Move it up to clear
996
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Y 56.0
997
-  #define Z_PROBE_ALLEN_KEY_STOW_3_Z 50.0
985
+  #define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 50.0 } // Move it up to clear
998 986
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
999 987
 
1000
-  #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0
1001
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0
1002
-  #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z
988
+  #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 50.0 }
1003 989
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1004 990
 
1005 991
 #endif // Z_PROBE_ALLEN_KEY

Завантаження…
Відмінити
Зберегти