浏览代码

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

Scott Lahteine 5 年前
父节点
当前提交
465c6d9230
没有帐户链接到提交者的电子邮件
共有 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
 #include <lpc17xx_pinsel.h>
33
 #include <lpc17xx_pinsel.h>
34
 #include <lpc17xx_libcfg_default.h>
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
 #define SBI32(n,b) (n |= _BV32(b))
79
 #define SBI32(n,b) (n |= _BV32(b))
80
 #define CBI32(n,b) (n &= ~_BV32(b))
80
 #define CBI32(n,b) (n &= ~_BV32(b))
81
 
81
 
82
+#define cu(x)      ((x)*(x)*(x))
82
 #define RADIANS(d) ((d)*float(M_PI)/180.0f)
83
 #define RADIANS(d) ((d)*float(M_PI)/180.0f)
83
 #define DEGREES(r) ((r)*180.0f/float(M_PI))
84
 #define DEGREES(r) ((r)*180.0f/float(M_PI))
84
 #define HYPOT2(x,y) (sq(x)+sq(y))
85
 #define HYPOT2(x,y) (sq(x)+sq(y))

+ 1
- 1
Marlin/src/core/serial.cpp 查看文件

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
   serialprintPGM(prefix);
72
   serialprintPGM(prefix);
73
   SERIAL_CHAR('(');
73
   SERIAL_CHAR('(');
74
   SERIAL_ECHO(x);
74
   SERIAL_ECHO(x);

+ 1
- 1
Marlin/src/core/serial.h 查看文件

186
 
186
 
187
 void print_bin(const uint16_t val);
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
 void print_xyz(PGM_P const prefix, PGM_P const suffix, const float xyz[]);
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
 #define SERIAL_POS(SUFFIX,VAR) do { print_xyz(PSTR("  " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); }while(0)
191
 #define SERIAL_POS(SUFFIX,VAR) do { print_xyz(PSTR("  " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); }while(0)
192
 #define SERIAL_XYZ(PREFIX,V...) do { print_xyz(PSTR(PREFIX), nullptr, V); }while(0)
192
 #define SERIAL_XYZ(PREFIX,V...) do { print_xyz(PSTR(PREFIX), nullptr, V); }while(0)

+ 2
- 2
Marlin/src/feature/I2CPositionEncoder.cpp 查看文件

168
           if (errPrstIdx >= I2CPE_ERR_PRST_ARRAY_SIZE) {
168
           if (errPrstIdx >= I2CPE_ERR_PRST_ARRAY_SIZE) {
169
             float sumP = 0;
169
             float sumP = 0;
170
             LOOP_L_N(i, I2CPE_ERR_PRST_ARRAY_SIZE) sumP += errPrst[i];
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
             SERIAL_ECHO(axis_codes[encoderAxis]);
172
             SERIAL_ECHO(axis_codes[encoderAxis]);
173
             SERIAL_ECHOLNPAIR(" - err detected: ", errorP * planner.steps_to_mm[encoderAxis], "mm; correcting!");
173
             SERIAL_ECHOLNPAIR(" - err detected: ", errorP * planner.steps_to_mm[encoderAxis], "mm; correcting!");
174
             babystep.add_steps(encoderAxis, -LROUND(errorP));
174
             babystep.add_steps(encoderAxis, -LROUND(errorP));
440
       total += new_steps_mm;
440
       total += new_steps_mm;
441
 
441
 
442
       // swap start and end points so next loop runs from current position
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
       startCoord[encoderAxis] = endCoord[encoderAxis];
444
       startCoord[encoderAxis] = endCoord[encoderAxis];
445
       endCoord[encoderAxis] = tempCoord;
445
       endCoord[encoderAxis] = tempCoord;
446
     }
446
     }

+ 6
- 6
Marlin/src/feature/backlash.h 查看文件

60
       static void measure_with_probe();
60
       static void measure_with_probe();
61
   #endif
61
   #endif
62
 
62
 
63
-  static inline float get_measurement(const uint8_t e) {
63
+  static inline float get_measurement(const AxisEnum a) {
64
     // Return the measurement averaged over all readings
64
     // Return the measurement averaged over all readings
65
     return (
65
     return (
66
       #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
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
       #endif
68
       #endif
69
       0
69
       0
70
     );
70
     );
71
     #if DISABLED(MEASURE_BACKLASH_WHEN_PROBING)
71
     #if DISABLED(MEASURE_BACKLASH_WHEN_PROBING)
72
-      UNUSED(e);
72
+      UNUSED(a);
73
     #endif
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
     return (false
77
     return (false
78
       #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
78
       #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
79
-        || (measured_count[e] > 0)
79
+        || (measured_count[a] > 0)
80
       #endif
80
       #endif
81
     );
81
     );
82
     #if DISABLED(MEASURE_BACKLASH_WHEN_PROBING)
82
     #if DISABLED(MEASURE_BACKLASH_WHEN_PROBING)
83
-      UNUSED(e);
83
+      UNUSED(a);
84
     #endif
84
     #endif
85
   }
85
   }
86
 
86
 

+ 2
- 4
Marlin/src/feature/bedlevel/abl/abl.cpp 查看文件

282
               ry = raw[Y_AXIS] - bilinear_start[Y_AXIS];
282
               ry = raw[Y_AXIS] - bilinear_start[Y_AXIS];
283
 
283
 
284
   #if ENABLED(EXTRAPOLATE_BEYOND_GRID)
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
   #else
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
   #endif
288
   #endif
291
 
289
 
292
   if (last_x != rx) {
290
   if (last_x != rx) {

+ 1
- 1
Marlin/src/feature/bedlevel/bedlevel.h 查看文件

56
     TemporaryBedLevelingState(const bool enable);
56
     TemporaryBedLevelingState(const bool enable);
57
     ~TemporaryBedLevelingState() { set_bed_leveling_enabled(saved); }
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
 #if HAS_MESH
61
 #if HAS_MESH
62
 
62
 

+ 4
- 4
Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h 查看文件

73
   }
73
   }
74
 
74
 
75
   static int8_t cell_index_x(const float &x) {
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
     return constrain(cx, 0, (GRID_MAX_POINTS_X) - 2);
77
     return constrain(cx, 0, (GRID_MAX_POINTS_X) - 2);
78
   }
78
   }
79
 
79
 
80
   static int8_t cell_index_y(const float &y) {
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
     return constrain(cy, 0, (GRID_MAX_POINTS_Y) - 2);
82
     return constrain(cy, 0, (GRID_MAX_POINTS_Y) - 2);
83
   }
83
   }
84
 
84
 
85
   static int8_t probe_index_x(const float &x) {
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
     return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
87
     return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
88
   }
88
   }
89
 
89
 
90
   static int8_t probe_index_y(const float &y) {
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
     return WITHIN(py, 0, GRID_MAX_POINTS_Y - 1) ? py : -1;
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
     FORCE_INLINE static void set_z(const int8_t px, const int8_t py, const float &z) { z_values[px][py] = z; }
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
     static int8_t get_cell_index_x(const float &x) {
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
       return constrain(cx, 0, (GRID_MAX_POINTS_X) - 1);   // -1 is appropriate if we want all movement to the X_MAX
149
       return constrain(cx, 0, (GRID_MAX_POINTS_X) - 1);   // -1 is appropriate if we want all movement to the X_MAX
150
     }                                                     // position. But with this defined this way, it is possible
150
     }                                                     // position. But with this defined this way, it is possible
151
                                                           // to extrapolate off of this point even further out. Probably
151
                                                           // to extrapolate off of this point even further out. Probably
152
                                                           // that is OK because something else should be keeping that from
152
                                                           // that is OK because something else should be keeping that from
153
                                                           // happening and should not be worried about at this level.
153
                                                           // happening and should not be worried about at this level.
154
     static int8_t get_cell_index_y(const float &y) {
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
       return constrain(cy, 0, (GRID_MAX_POINTS_Y) - 1);   // -1 is appropriate if we want all movement to the Y_MAX
156
       return constrain(cy, 0, (GRID_MAX_POINTS_Y) - 1);   // -1 is appropriate if we want all movement to the Y_MAX
157
     }                                                     // position. But with this defined this way, it is possible
157
     }                                                     // position. But with this defined this way, it is possible
158
                                                           // to extrapolate off of this point even further out. Probably
158
                                                           // to extrapolate off of this point even further out. Probably
160
                                                           // happening and should not be worried about at this level.
160
                                                           // happening and should not be worried about at this level.
161
 
161
 
162
     static int8_t find_closest_x_index(const float &x) {
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
       return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
164
       return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
165
     }
165
     }
166
 
166
 
167
     static int8_t find_closest_y_index(const float &y) {
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
       return WITHIN(py, 0, GRID_MAX_POINTS_Y - 1) ? py : -1;
169
       return WITHIN(py, 0, GRID_MAX_POINTS_Y - 1) ? py : -1;
170
     }
170
     }
171
 
171
 
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
                   z1 = z_values[x1_i][yi];
214
                   z1 = z_values[x1_i][yi];
215
 
215
 
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
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
         );
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
                   z1 = z_values[xi][y1_i];
243
                   z1 = z_values[xi][y1_i];
244
 
244
 
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
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
 
441
 
442
         #if HAS_BED_PROBE
442
         #if HAS_BED_PROBE
443
 
443
 
444
-          case 1:
444
+          case 1: {
445
             //
445
             //
446
             // Invalidate Entire Mesh and Automatically Probe Mesh in areas that can be reached by the probe
446
             // Invalidate Entire Mesh and Automatically Probe Mesh in areas that can be reached by the probe
447
             //
447
             //
460
 
460
 
461
             report_current_position();
461
             report_current_position();
462
             probe_deployed = true;
462
             probe_deployed = true;
463
-            break;
463
+          } break;
464
 
464
 
465
         #endif // HAS_BED_PROBE
465
         #endif // HAS_BED_PROBE
466
 
466
 

+ 10
- 10
Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp 查看文件

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

+ 2
- 2
Marlin/src/feature/dac/stepper_dac.cpp 查看文件

74
   mcp4728_simpleCommand(UPDATE);
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
 uint8_t dac_current_get_percent(AxisEnum axis) { return mcp4728_getDrvPct(dac_order[axis]); }
80
 uint8_t dac_current_get_percent(AxisEnum axis) { return mcp4728_getDrvPct(dac_order[axis]); }
81
 void dac_current_set_percents(const uint8_t pct[XYZE]) {
81
 void dac_current_set_percents(const uint8_t pct[XYZE]) {

+ 1
- 1
Marlin/src/feature/filwidth.h 查看文件

66
   }
66
   }
67
 
67
 
68
   // Convert raw measurement to mm
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
   static inline float raw_to_mm() { return raw_to_mm(raw); }
70
   static inline float raw_to_mm() { return raw_to_mm(raw); }
71
 
71
 
72
   // A scaled reading is ready
72
   // A scaled reading is ready

+ 2
- 1
Marlin/src/feature/runout.h 查看文件

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

+ 1
- 5
Marlin/src/gcode/bedlevel/abl/G29.cpp 查看文件

769
 
769
 
770
       if (!dryrun && !isnan(measured_z)) {
770
       if (!dryrun && !isnan(measured_z)) {
771
         vector_3 planeNormal = vector_3::cross(points[0] - points[1], points[2] - points[1]).get_normal();
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
         planner.bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
773
         planner.bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
778
 
774
 
779
         // Can't re-enable (on error) until the new grid is written
775
         // Can't re-enable (on error) until the new grid is written

+ 2
- 1
Marlin/src/gcode/calibrate/G33.cpp 查看文件

369
         delta_r = {0.0},
369
         delta_r = {0.0},
370
         delta_t[ABC] = {0.0};
370
         delta_t[ABC] = {0.0};
371
 
371
 
372
+  ZERO(delta_t);
372
   LOOP_XYZ(axis) {
373
   LOOP_XYZ(axis) {
373
-    LOOP_XYZ(axis_2) delta_t[axis_2] = 0.0;
374
     delta_t[axis] = diff;
374
     delta_t[axis] = diff;
375
     calc_kinematics_diff_probe_points(z_pt, delta_e, delta_r, delta_t);
375
     calc_kinematics_diff_probe_points(z_pt, delta_e, delta_r, delta_t);
376
+    delta_t[axis] = 0;
376
     a_fac += z_pt[uint8_t((axis * _4P_STEP) - _7P_STEP + NPP) % NPP + 1] / 6.0;
377
     a_fac += z_pt[uint8_t((axis * _4P_STEP) - _7P_STEP + NPP) % NPP + 1] / 6.0;
377
     a_fac -= z_pt[uint8_t((axis * _4P_STEP) + 1 + _7P_STEP)] / 6.0;
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
 
314
 
315
   // The difference between the known and the measured location
315
   // The difference between the known and the measured location
316
   // of the calibration object is the positional error
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
   m.pos_error[Z_AXIS] = m.true_center[Z_AXIS] - m.obj_center[Z_AXIS];
327
   m.pos_error[Z_AXIS] = m.true_center[Z_AXIS] - m.obj_center[Z_AXIS];
330
 }
328
 }
331
 
329
 
394
 
392
 
395
   inline void report_measured_nozzle_dimensions(const measurements_t &m) {
393
   inline void report_measured_nozzle_dimensions(const measurements_t &m) {
396
     SERIAL_ECHOLNPGM("Nozzle Tip Outer Dimensions:");
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
     #else
402
     #else
405
       UNUSED(m);
403
       UNUSED(m);
406
     #endif
404
     #endif
412
     // This function requires normalize_hotend_offsets() to be called
410
     // This function requires normalize_hotend_offsets() to be called
413
     //
411
     //
414
     inline void report_hotend_offsets() {
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
   #endif
416
   #endif
417
+
425
 #endif // CALIBRATION_REPORTING
418
 #endif // CALIBRATION_REPORTING
426
 
419
 
427
 /**
420
 /**

+ 5
- 5
Marlin/src/gcode/calibrate/M425.cpp 查看文件

46
 void GcodeSuite::M425() {
46
 void GcodeSuite::M425() {
47
   bool noArgs = true;
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
       planner.synchronize();
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
       noArgs = false;
53
       noArgs = false;
54
     }
54
     }
55
   }
55
   }
88
     #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
88
     #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
89
       SERIAL_ECHOPGM("  Average measured backlash (mm):");
89
       SERIAL_ECHOPGM("  Average measured backlash (mm):");
90
       if (backlash.has_any_measurement()) {
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
           SERIAL_CHAR(' ');
92
           SERIAL_CHAR(' ');
93
           SERIAL_CHAR(axis_codes[a]);
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
       else
97
       else

+ 2
- 2
Marlin/src/gcode/control/M605.cpp 查看文件

137
         DEBUG_EOL();
137
         DEBUG_EOL();
138
 
138
 
139
         HOTEND_LOOP() {
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
           DEBUG_EOL();
142
           DEBUG_EOL();
143
         }
143
         }
144
         DEBUG_EOL();
144
         DEBUG_EOL();

+ 2
- 5
Marlin/src/gcode/feature/mixing/M166.cpp 查看文件

30
 #include "../../../feature/mixing.h"
30
 #include "../../../feature/mixing.h"
31
 
31
 
32
 inline void echo_mix() {
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
 inline void echo_zt(const int t, const float &z) {
36
 inline void echo_zt(const int t, const float &z) {
39
   mixer.update_mix_from_vtool(t);
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
   echo_mix();
39
   echo_mix();
43
 }
40
 }
44
 
41
 

+ 3
- 3
Marlin/src/gcode/host/M114.cpp 查看文件

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

+ 16
- 14
Marlin/src/gcode/motion/G2_G3.cpp 查看文件

280
 
280
 
281
     float arc_offset[2] = { 0, 0 };
281
     float arc_offset[2] = { 0, 0 };
282
     if (parser.seenval('R')) {
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
     else {
301
     else {

+ 2
- 5
Marlin/src/gcode/probe/G30.cpp 查看文件

54
   const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE;
54
   const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE;
55
   const float measured_z = probe_pt(xpos, ypos, raise_after, 1);
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
   clean_up_after_endstop_or_probe_move();
60
   clean_up_after_endstop_or_probe_move();
64
 
61
 

+ 2
- 0
Marlin/src/inc/MarlinConfigPre.h 查看文件

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

+ 2
- 0
Marlin/src/inc/SanityCheck.h 查看文件

388
   #error "SDPOWER is now SDPOWER_PIN. Please update your configuration and/or pins."
388
   #error "SDPOWER is now SDPOWER_PIN. Please update your configuration and/or pins."
389
 #elif defined(STRING_SPLASH_LINE1) || defined(STRING_SPLASH_LINE2)
389
 #elif defined(STRING_SPLASH_LINE1) || defined(STRING_SPLASH_LINE2)
390
   #error "STRING_SPLASH_LINE[12] are now obsolete. Please remove them from Configuration.h."
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
 #endif
393
 #endif
392
 
394
 
393
 #define BOARD_MKS_13        -1000
395
 #define BOARD_MKS_13        -1000

+ 9
- 11
Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp 查看文件

658
   #endif
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
   char str[7];
662
   char str[7];
663
   set_ddram_address(DDRAM_LINE_4);
663
   set_ddram_address(DDRAM_LINE_4);
664
   begin_data();
664
   begin_data();
667
   const unsigned char alt_label = position_known ? 0 : (ui.get_blink() ? ' ' : 0);
667
   const unsigned char alt_label = position_known ? 0 : (ui.get_blink() ? ' ' : 0);
668
 
668
 
669
   write_byte(alt_label ? alt_label : 'X');
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
   write_byte(alt_label ? alt_label : 'Y');
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
   write_byte(alt_label ? alt_label : 'Z');
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
 bool ST7920_Lite_Status_Screen::indicators_changed() {
679
 bool ST7920_Lite_Status_Screen::indicators_changed() {
826
       }
826
       }
827
     }
827
     }
828
 
828
 
829
-    if (countdown == 0 && (forceUpdate || position_changed() ||
829
+    if (countdown == 0 && (forceUpdate || position_changed()
830
       #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
830
       #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
831
-        blink_changed()
831
+        || blink_changed()
832
       #endif
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
         #endif
837
         #endif
840
       );
838
       );
841
     }
839
     }

+ 1
- 1
Marlin/src/lcd/dogm/status_screen_lite_ST7920.h 查看文件

86
     static void draw_print_time(const duration_t &elapsed);
86
     static void draw_print_time(const duration_t &elapsed);
87
     static void draw_feedrate_percentage(const uint16_t percentage);
87
     static void draw_feedrate_percentage(const uint16_t percentage);
88
     static void draw_status_message();
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
     static bool indicators_changed();
91
     static bool indicators_changed();
92
     static bool position_changed();
92
     static bool position_changed();

+ 2
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/move_axis_screen.cpp 查看文件

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

+ 1
- 1
Marlin/src/lcd/ultralcd.cpp 查看文件

685
         // previous invocation is being blocked. Modifications to manual_move_offset shouldn't be made while
685
         // previous invocation is being blocked. Modifications to manual_move_offset shouldn't be made while
686
         // processing_manual_move is true or the planner will get out of sync.
686
         // processing_manual_move is true or the planner will get out of sync.
687
         processing_manual_move = true;
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
         processing_manual_move = false;
689
         processing_manual_move = false;
690
 
690
 
691
         feedrate_mm_s = old_feedrate;
691
         feedrate_mm_s = old_feedrate;

+ 2
- 2
Marlin/src/libs/L6470/L6470_Marlin.cpp 查看文件

384
     } break;
384
     } break;
385
 
385
 
386
     case 'Z': {
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
       echo_min_max('Z', position_min, position_max);
389
       echo_min_max('Z', position_min, position_max);
390
       if (false
390
       if (false
391
         #ifdef Z_MIN_POS
391
         #ifdef Z_MIN_POS

+ 12
- 11
Marlin/src/libs/least_squares_fit.h 查看文件

51
 void inline incremental_WLSF(struct linear_fit_data *lsf, const float &x, const float &y, const float &z, const float &w) {
51
 void inline incremental_WLSF(struct linear_fit_data *lsf, const float &x, const float &y, const float &z, const float &w) {
52
   // weight each accumulator by factor w, including the "number" of samples
52
   // weight each accumulator by factor w, including the "number" of samples
53
   // (analogous to calling inc_LSF twice with same values to weight it by 2X)
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
   lsf->N     += w;
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
 void inline incremental_LSF(struct linear_fit_data *lsf, const float &x, const float &y, const float &z) {
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
     if (!TEST(cleans, Z_AXIS)) start.z = end.z = current_position[Z_AXIS];
175
     if (!TEST(cleans, Z_AXIS)) start.z = end.z = current_position[Z_AXIS];
176
 
176
 
177
     switch (pattern) {
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
 #if ENABLED(NOZZLE_PARK_FEATURE)
186
 #if ENABLED(NOZZLE_PARK_FEATURE)
194
 
187
 
195
   void Nozzle::park(const uint8_t z_action, const point_t &park/*=NOZZLE_PARK_POINT*/) {
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
     switch (z_action) {
191
     switch (z_action) {
200
       case 1: // Go to Z-park height
192
       case 1: // Go to Z-park height

+ 3
- 1
Marlin/src/libs/numtostr.cpp 查看文件

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

+ 5
- 1
Marlin/src/libs/numtostr.h 查看文件

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

+ 3
- 1
Marlin/src/libs/stopwatch.h 查看文件

25
 //#define DEBUG_STOPWATCH
25
 //#define DEBUG_STOPWATCH
26
 
26
 
27
 #include "../core/macros.h" // for FORCE_INLINE
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
  * @brief Stopwatch class
33
  * @brief Stopwatch class

+ 5
- 2
Marlin/src/libs/vector_3.cpp 查看文件

57
                   left.x * right.y - left.y * right.x);
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
 vector_3 vector_3::get_normal() const {
66
 vector_3 vector_3::get_normal() const {
64
   vector_3 normalized = vector_3(x, y, z);
67
   vector_3 normalized = vector_3(x, y, z);

+ 4
- 0
Marlin/src/libs/vector_3.h 查看文件

52
 
52
 
53
   vector_3 operator+(const vector_3 &v);
53
   vector_3 operator+(const vector_3 &v);
54
   vector_3 operator-(const vector_3 &v);
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
   void normalize();
59
   void normalize();
56
   float get_length() const;
60
   float get_length() const;
57
   vector_3 get_normal() const;
61
   vector_3 get_normal() const;

+ 7
- 12
Marlin/src/module/configuration_store.cpp 查看文件

1205
         const float backlash_smoothing_mm = 3;
1205
         const float backlash_smoothing_mm = 3;
1206
       #endif
1206
       #endif
1207
       _FIELD_TEST(backlash_distance_mm);
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
       EEPROM_WRITE(backlash_correction);
1209
       EEPROM_WRITE(backlash_correction);
1212
       EEPROM_WRITE(backlash_smoothing_mm);
1210
       EEPROM_WRITE(backlash_smoothing_mm);
1213
     }
1211
     }
2010
           float backlash_smoothing_mm;
2008
           float backlash_smoothing_mm;
2011
         #endif
2009
         #endif
2012
         _FIELD_TEST(backlash_distance_mm);
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
         EEPROM_READ(backlash_correction);
2012
         EEPROM_READ(backlash_correction);
2017
         EEPROM_READ(backlash_smoothing_mm);
2013
         EEPROM_READ(backlash_smoothing_mm);
2018
       }
2014
       }
2805
       CONFIG_ECHO_START();
2801
       CONFIG_ECHO_START();
2806
       for (uint8_t e = 1; e < HOTENDS; e++) {
2802
       for (uint8_t e = 1; e < HOTENDS; e++) {
2807
         SERIAL_ECHOPAIR(
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
         SERIAL_ECHOLNPAIR_F(" Z", LINEAR_UNIT(hotend_offset[Z_AXIS][e]), 3);
2807
         SERIAL_ECHOLNPAIR_F(" Z", LINEAR_UNIT(hotend_offset[Z_AXIS][e]), 3);
2813
       }
2808
       }
2922
       CONFIG_ECHO_HEADING("Endstop adjustment:");
2917
       CONFIG_ECHO_HEADING("Endstop adjustment:");
2923
       CONFIG_ECHO_START();
2918
       CONFIG_ECHO_START();
2924
       SERIAL_ECHOLNPAIR(
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
       CONFIG_ECHO_HEADING("Delta settings: L<diagonal_rod> R<radius> H<height> S<segments_per_s> B<calibration radius> XYZ<tower angle corrections>");
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
  */
101
  */
102
 
102
 
103
 #define DELTA_DEBUG(VAR) do { \
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
   }while(0)
106
   }while(0)
111
 
107
 
112
 void inverse_kinematics(const float (&raw)[XYZ]) {
108
 void inverse_kinematics(const float (&raw)[XYZ]) {

+ 2
- 2
Marlin/src/module/motion.cpp 查看文件

105
  * Cartesian Destination
105
  * Cartesian Destination
106
  *   The destination for a move, filled in by G-code movement commands,
106
  *   The destination for a move, filled in by G-code movement commands,
107
  *   and expected by functions like 'prepare_move_to_destination'.
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
 float destination[XYZE]; // = { 0 }
110
 float destination[XYZE]; // = { 0 }
111
 
111
 
670
 
670
 
671
     // For SCARA enforce a minimum segment size
671
     // For SCARA enforce a minimum segment size
672
     #if IS_SCARA
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
     #endif
674
     #endif
675
 
675
 
676
     // At least one segment is required
676
     // At least one segment is required

+ 31
- 31
Marlin/src/module/planner.cpp 查看文件

1174
  * Maintain fans, paste extruder pressure,
1174
  * Maintain fans, paste extruder pressure,
1175
  */
1175
  */
1176
 void Planner::check_axes_activity() {
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
   #if FAN_COUNT > 0
1182
   #if FAN_COUNT > 0
1180
     uint8_t tail_fan_speed[FAN_COUNT];
1183
     uint8_t tail_fan_speed[FAN_COUNT];
1190
   #endif
1193
   #endif
1191
 
1194
 
1192
   if (has_blocks_queued()) {
1195
   if (has_blocks_queued()) {
1193
-    block_t* block;
1194
 
1196
 
1195
     #if FAN_COUNT > 0 || ENABLED(BARICUDA)
1197
     #if FAN_COUNT > 0 || ENABLED(BARICUDA)
1196
-      block = &block_buffer[block_buffer_tail];
1198
+      block_t *block = &block_buffer[block_buffer_tail];
1197
     #endif
1199
     #endif
1198
 
1200
 
1199
     #if FAN_COUNT > 0
1201
     #if FAN_COUNT > 0
1210
       #endif
1212
       #endif
1211
     #endif
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
   else {
1222
   else {
1219
     #if FAN_COUNT > 0
1223
     #if FAN_COUNT > 0
1517
       const bool was_enabled = STEPPER_ISR_ENABLED();
1521
       const bool was_enabled = STEPPER_ISR_ENABLED();
1518
       if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
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
       if (was_enabled) ENABLE_STEPPER_DRIVER_INTERRUPT();
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
     else
1533
     else
1530
       axis_steps = stepper.position(axis);
1534
       axis_steps = stepper.position(axis);
1551
  *
1555
  *
1552
  * Add a new linear movement to the planner queue (in terms of steps).
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
  * Returns true if movement was properly queued, false otherwise
1564
  * Returns true if movement was properly queued, false otherwise
1561
  */
1565
  */
1644
   #endif
1648
   #endif
1645
 
1649
 
1646
   /* <-- add a slash to enable
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
   #if EITHER(PREVENT_COLD_EXTRUSION, PREVENT_LENGTHY_EXTRUDE)
1661
   #if EITHER(PREVENT_COLD_EXTRUSION, PREVENT_LENGTHY_EXTRUDE)
2633
   //*/
2633
   //*/
2634
 
2634
 
2635
   // Queue the movement
2635
   // Queue the movement
2636
-    if (
2636
+  if (
2637
     !_buffer_steps(target
2637
     !_buffer_steps(target
2638
       #if HAS_POSITION_FLOAT
2638
       #if HAS_POSITION_FLOAT
2639
         , target_float
2639
         , target_float

+ 2
- 4
Marlin/src/module/planner.h 查看文件

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

+ 21
- 111
Marlin/src/module/probe.cpp 查看文件

155
 #elif ENABLED(Z_PROBE_ALLEN_KEY)
155
 #elif ENABLED(Z_PROBE_ALLEN_KEY)
156
 
156
 
157
   void run_deploy_moves_script() {
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
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE
159
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE
169
         #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE 0.0
160
         #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE 0.0
170
       #endif
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
       do_blocking_move_to(deploy_1, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE));
163
       do_blocking_move_to(deploy_1, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE));
173
     #endif
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
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE
166
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE
185
         #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE 0.0
167
         #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE 0.0
186
       #endif
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
       do_blocking_move_to(deploy_2, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE));
170
       do_blocking_move_to(deploy_2, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE));
189
     #endif
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
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE
173
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE
201
         #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE 0.0
174
         #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE 0.0
202
       #endif
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
       do_blocking_move_to(deploy_3, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE));
177
       do_blocking_move_to(deploy_3, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE));
205
     #endif
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
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE
180
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE
217
         #define Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE 0.0
181
         #define Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE 0.0
218
       #endif
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
       do_blocking_move_to(deploy_4, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE));
184
       do_blocking_move_to(deploy_4, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE));
221
     #endif
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
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE
187
       #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE
233
         #define Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE 0.0
188
         #define Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE 0.0
234
       #endif
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
       do_blocking_move_to(deploy_5, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE));
191
       do_blocking_move_to(deploy_5, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE));
237
     #endif
192
     #endif
238
   }
193
   }
239
 
194
 
240
   void run_stow_moves_script() {
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
       #ifndef Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE
197
       #ifndef Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE
252
         #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE 0.0
198
         #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE 0.0
253
       #endif
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
       do_blocking_move_to(stow_1, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE));
201
       do_blocking_move_to(stow_1, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE));
256
     #endif
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
       #ifndef Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE
204
       #ifndef Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE
268
         #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE 0.0
205
         #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE 0.0
269
       #endif
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
       do_blocking_move_to(stow_2, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE));
208
       do_blocking_move_to(stow_2, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE));
272
     #endif
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
       #ifndef Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE
211
       #ifndef Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE
284
         #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE 0.0
212
         #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE 0.0
285
       #endif
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
       do_blocking_move_to(stow_3, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE));
215
       do_blocking_move_to(stow_3, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE));
288
     #endif
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
       #ifndef Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE
218
       #ifndef Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE
300
         #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE 0.0
219
         #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE 0.0
301
       #endif
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
       do_blocking_move_to(stow_4, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE));
222
       do_blocking_move_to(stow_4, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE));
304
     #endif
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
       #ifndef Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE
225
       #ifndef Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE
316
         #define Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE 0.0
226
         #define Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE 0.0
317
       #endif
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
       do_blocking_move_to(stow_5, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE));
229
       do_blocking_move_to(stow_5, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE));
320
     #endif
230
     #endif
321
   }
231
   }
741
 
651
 
742
     #endif
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
   #elif TOTAL_PROBING == 2
656
   #elif TOTAL_PROBING == 2
747
 
657
 

+ 20
- 19
Marlin/src/module/stepper.cpp 查看文件

174
 uint32_t Stepper::advance_dividend[XYZE] = { 0 },
174
 uint32_t Stepper::advance_dividend[XYZE] = { 0 },
175
          Stepper::advance_divisor = 0,
175
          Stepper::advance_divisor = 0,
176
          Stepper::step_events_completed = 0, // The number of step events executed in the current block
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
          Stepper::step_event_count;          // The total event count for the current block
179
          Stepper::step_event_count;          // The total event count for the current block
180
 
180
 
181
 #if EXTRUDERS > 1 || ENABLED(MIXING_EXTRUDER)
181
 #if EXTRUDERS > 1 || ENABLED(MIXING_EXTRUDER)
2239
 
2239
 
2240
   const bool was_enabled = STEPPER_ISR_ENABLED();
2240
   const bool was_enabled = STEPPER_ISR_ENABLED();
2241
   if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
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
   // Discard the rest of the move if there is a current block
2253
   // Discard the rest of the move if there is a current block
2257
   quick_stop();
2254
   quick_stop();
2279
 
2276
 
2280
 void Stepper::report_positions() {
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
   const int32_t xpos = count_position[X_AXIS],
2285
   const int32_t xpos = count_position[X_AXIS],
2287
                 ypos = count_position[Y_AXIS],
2286
                 ypos = count_position[Y_AXIS],
2288
                 zpos = count_position[Z_AXIS];
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
   #if CORE_IS_XY || CORE_IS_XZ || ENABLED(DELTA) || IS_SCARA
2293
   #if CORE_IS_XY || CORE_IS_XZ || ENABLED(DELTA) || IS_SCARA
2293
     SERIAL_ECHOPGM(MSG_COUNT_A);
2294
     SERIAL_ECHOPGM(MSG_COUNT_A);

+ 3
- 0
Marlin/src/module/stepper.h 查看文件

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

+ 13
- 12
Marlin/src/module/temperature.cpp 查看文件

1320
 
1320
 
1321
     if (!WITHIN(t_index, 0, COUNT(user_thermistor) - 1)) return 25;
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
     // maximum adc value .. take into account the over sampling
1333
     // maximum adc value .. take into account the over sampling
1334
               adc_raw = constrain(raw, 1, adc_max - 1); // constrain to prevent divide-by-zero
1335
               adc_raw = constrain(raw, 1, adc_max - 1); // constrain to prevent divide-by-zero
1335
 
1336
 
1336
     const float adc_inverse = (adc_max - adc_raw) - 0.5f,
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
                 log_resistance = logf(resistance);
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
     value = 1.0f / value;
1345
     value = 1.0f / value;
1345
 
1346
 
1346
     //#if (MOTHERBOARD == BOARD_RAMPS_14_EFB)
1347
     //#if (MOTHERBOARD == BOARD_RAMPS_14_EFB)

+ 29
- 28
Marlin/src/module/tool_change.cpp 查看文件

133
 
133
 
134
 #endif // SWITCHING_NOZZLE
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
 #if ENABLED(MAGNETIC_PARKING_EXTRUDER)
142
 #if ENABLED(MAGNETIC_PARKING_EXTRUDER)
141
 
143
 
150
 
152
 
151
     const float oldx = current_position[X_AXIS],
153
     const float oldx = current_position[X_AXIS],
152
                 grabpos = mpe_settings.parking_xpos[new_tool] + (new_tool ? mpe_settings.grab_distance : -mpe_settings.grab_distance),
154
                 grabpos = mpe_settings.parking_xpos[new_tool] + (new_tool ? mpe_settings.grab_distance : -mpe_settings.grab_distance),
153
-                offsetcompensation =
155
+                offsetcompensation = (0
154
                   #if HAS_HOTEND_OFFSET
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
                   #endif
158
                   #endif
159
-              ;
159
+                );
160
 
160
 
161
     if (axis_unhomed_error(true, false, false)) return;
161
     if (axis_unhomed_error(true, false, false)) return;
162
 
162
 
337
         planner.synchronize();
337
         planner.synchronize();
338
         DEBUG_POS("(5) Unpark extruder", current_position);
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
       // STEP 6
342
       // STEP 6
343
 
343
 
411
 
411
 
412
     current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS;
412
     current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS;
413
     if (DEBUGGING(LEVELING)) DEBUG_POS("Move Y SwitchPos", current_position);
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
     // Wait for move to complete, then another 0.2s
416
     // Wait for move to complete, then another 0.2s
417
     planner.synchronize();
417
     planner.synchronize();
446
       DEBUG_ECHOLNPGM("(4) Grab and lock new toolhead");
446
       DEBUG_ECHOLNPGM("(4) Grab and lock new toolhead");
447
       DEBUG_POS("Move Y SwitchPos", current_position);
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
     // Wait for move to finish, pause 0.2s, move servo, pause 0.5s
451
     // Wait for move to finish, pause 0.2s, move servo, pause 0.5s
452
     planner.synchronize();
452
     planner.synchronize();
491
       SERIAL_ECHOLNPAIR("(1) Place old tool ", int(active_extruder));
491
       SERIAL_ECHOLNPAIR("(1) Place old tool ", int(active_extruder));
492
       DEBUG_POS("Move Y SwitchPos + Security", current_position);
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
     current_position[X_AXIS] = placexclear;
496
     current_position[X_AXIS] = placexclear;
497
     if (DEBUGGING(LEVELING)) {
497
     if (DEBUGGING(LEVELING)) {
498
       planner.synchronize();
498
       planner.synchronize();
499
       DEBUG_POS("Move X SwitchPos + Security", current_position);
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
     current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS;
503
     current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS;
504
     if (DEBUGGING(LEVELING)) {
504
     if (DEBUGGING(LEVELING)) {
505
       planner.synchronize();
505
       planner.synchronize();
506
       DEBUG_POS("Move Y SwitchPos", current_position);
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
     current_position[X_AXIS] = placexpos;
510
     current_position[X_AXIS] = placexpos;
511
     if (DEBUGGING(LEVELING)) {
511
     if (DEBUGGING(LEVELING)) {
541
 
541
 
542
     current_position[X_AXIS] = grabxpos;
542
     current_position[X_AXIS] = grabxpos;
543
     if (DEBUGGING(LEVELING)) DEBUG_POS("Move to new toolhead X", current_position);
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
     // 4. Grab the new toolhead and move to security position
546
     // 4. Grab the new toolhead and move to security position
547
 
547
 
559
       planner.synchronize();
559
       planner.synchronize();
560
       DEBUG_POS("Move Y SwitchPos", current_position);
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
     #if ENABLED(PRIME_BEFORE_REMOVE) && (SWITCHING_TOOLHEAD_PRIME_MM || SWITCHING_TOOLHEAD_RETRACT_MM)
564
     #if ENABLED(PRIME_BEFORE_REMOVE) && (SWITCHING_TOOLHEAD_PRIME_MM || SWITCHING_TOOLHEAD_RETRACT_MM)
565
       #if SWITCHING_TOOLHEAD_PRIME_MM
565
       #if SWITCHING_TOOLHEAD_PRIME_MM
577
 
577
 
578
     current_position[X_AXIS] = grabxclear;
578
     current_position[X_AXIS] = grabxclear;
579
     if (DEBUGGING(LEVELING)) DEBUG_POS("Move to new toolhead X + Security", current_position);
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
     planner.synchronize();
581
     planner.synchronize();
582
     safe_delay(100); // Give switch time to settle
582
     safe_delay(100); // Give switch time to settle
583
 
583
 
584
     current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
584
     current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
585
     if (DEBUGGING(LEVELING)) DEBUG_POS("Move back Y clear", current_position);
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
     planner.synchronize(); // Always sync last tool-change move
587
     planner.synchronize(); // Always sync last tool-change move
588
 
588
 
589
     if (DEBUGGING(LEVELING)) DEBUG_POS("MST Tool-Change done.", current_position);
589
     if (DEBUGGING(LEVELING)) DEBUG_POS("MST Tool-Change done.", current_position);
620
 
620
 
621
     current_position[Z_AXIS] += SWITCHING_TOOLHEAD_Z_HOP;
621
     current_position[Z_AXIS] += SWITCHING_TOOLHEAD_Z_HOP;
622
     if (DEBUGGING(LEVELING)) DEBUG_POS("(1) Raise Z-Axis ", current_position);
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
     // 2. Move to position near active extruder parking
625
     // 2. Move to position near active extruder parking
626
 
626
 
629
       SERIAL_ECHOLNPAIR("(2) Move near active extruder parking", active_extruder);
629
       SERIAL_ECHOLNPAIR("(2) Move near active extruder parking", active_extruder);
630
       DEBUG_POS("Moving ParkPos", current_position);
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
     // 3. Move gently to park position of active extruder
636
     // 3. Move gently to park position of active extruder
637
 
637
 
642
     }
642
     }
643
 
643
 
644
     current_position[Y_AXIS] -= SWITCHING_TOOLHEAD_Y_CLEAR;
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
     // 4. Disengage magnetic field, wait for delay
647
     // 4. Disengage magnetic field, wait for delay
648
 
648
 
658
     }
658
     }
659
 
659
 
660
     current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
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
     // 6. Move gently to park position of new extruder
667
     // 6. Move gently to park position of new extruder
667
 
668
 
670
       planner.synchronize();
671
       planner.synchronize();
671
       DEBUG_ECHOLNPGM("(6) Move near new extruder");
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
     // 7. Engage magnetic field for new extruder parking
676
     // 7. Engage magnetic field for new extruder parking
676
 
677
 
682
 
683
 
683
     current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
684
     current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
684
     if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("(8) Unpark extruder");
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
     planner.synchronize(); // Always sync the final move
687
     planner.synchronize(); // Always sync the final move
687
 
688
 
688
     // 9. Apply Z hotend offset to current position
689
     // 9. Apply Z hotend offset to current position

+ 7
- 21
config/examples/delta/Anycubic/Kossel/Configuration.h 查看文件

1028
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
1028
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
1029
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1050
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1065
 
1051
 
1066
 #endif // Z_PROBE_ALLEN_KEY
1052
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/Dreammaker/Overlord/Configuration.h 查看文件

973
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
973
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
974
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
995
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1010
 
996
 
1011
 #endif // Z_PROBE_ALLEN_KEY
997
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/Dreammaker/Overlord_Pro/Configuration.h 查看文件

985
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
985
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
986
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1007
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1022
 
1008
 
1023
 #endif // Z_PROBE_ALLEN_KEY
1009
 #endif // Z_PROBE_ALLEN_KEY

+ 10
- 24
config/examples/delta/FLSUN/auto_calibrate/Configuration.h 查看文件

975
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
975
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
976
 
976
 
977
   // Kossel Mini
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
985
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
992
 
986
 
993
   #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
987
   #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
994
   // Move the probe into position
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
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
990
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
999
   // Move the nozzle down further to push the probe into retracted position.
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
   // Raise things back up slightly so we don't bump into anything
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
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
999
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1014
 
1000
 
1015
 #endif // Z_PROBE_ALLEN_KEY
1001
 #endif // Z_PROBE_ALLEN_KEY

+ 10
- 24
config/examples/delta/FLSUN/kossel/Configuration.h 查看文件

975
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
975
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
976
 
976
 
977
   // Kossel Mini
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
985
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
992
 
986
 
993
   #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
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
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
989
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
998
   // Move the nozzle down further to push the probe into retracted position.
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
   // Raise things back up slightly so we don't bump into anything
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
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
998
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1013
 
999
 
1014
 #endif // Z_PROBE_ALLEN_KEY
1000
 #endif // Z_PROBE_ALLEN_KEY

+ 11
- 25
config/examples/delta/FLSUN/kossel_mini/Configuration.h 查看文件

975
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
975
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
976
 
976
 
977
   // Kossel Mini
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
985
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
992
 
986
 
993
   #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
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
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
989
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
998
   // Move the nozzle down further to push the probe into retracted position.
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
   // Raise things back up slightly so we don't bump into anything
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
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
998
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1013
 
999
 
1014
 #endif // Z_PROBE_ALLEN_KEY
1000
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/Geeetech/Rostock 301/Configuration.h 查看文件

964
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
964
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
965
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
986
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1001
 
987
 
1002
 #endif // Z_PROBE_ALLEN_KEY
988
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/Hatchbox_Alpha/Configuration.h 查看文件

979
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
979
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
980
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1001
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1016
 
1002
 
1017
 #endif // Z_PROBE_ALLEN_KEY
1003
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/MKS/SBASE/Configuration.h 查看文件

964
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
964
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
965
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
986
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1001
 
987
 
1002
 #endif // Z_PROBE_ALLEN_KEY
988
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/Tevo Little Monster/Configuration.h 查看文件

968
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
968
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
969
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
990
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1005
 
991
 
1006
 #endif // Z_PROBE_ALLEN_KEY
992
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/generic/Configuration.h 查看文件

964
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
964
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
965
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
986
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1001
 
987
 
1002
 #endif // Z_PROBE_ALLEN_KEY
988
 #endif // Z_PROBE_ALLEN_KEY

+ 11
- 25
config/examples/delta/kossel_mini/Configuration.h 查看文件

965
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
965
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
966
 
966
 
967
   // Kossel Mini
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
975
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
982
 
976
 
983
   #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
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
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
979
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
988
   // Move the nozzle down further to push the probe into retracted position.
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
   // Raise things back up slightly so we don't bump into anything
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
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
988
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1003
 
989
 
1004
 #endif // Z_PROBE_ALLEN_KEY
990
 #endif // Z_PROBE_ALLEN_KEY

+ 8
- 24
config/examples/delta/kossel_pro/Configuration.h 查看文件

958
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
958
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
959
 
959
 
960
   // Kossel Pro
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE (XY_PROBE_SPEED)/2
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
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/2
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
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
983
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1000
 
984
 
1001
 #endif // Z_PROBE_ALLEN_KEY
985
 #endif // Z_PROBE_ALLEN_KEY

+ 7
- 21
config/examples/delta/kossel_xl/Configuration.h 查看文件

967
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
967
   // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
968
   // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10
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
   #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED
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
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
989
   #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED
1004
 
990
 
1005
 #endif // Z_PROBE_ALLEN_KEY
991
 #endif // Z_PROBE_ALLEN_KEY

正在加载...
取消
保存