Browse Source

Add missing motion inline methods (#15433)

Timm 5 years ago
parent
commit
b198f321c8
2 changed files with 15 additions and 6 deletions
  1. 1
    1
      Marlin/src/feature/pause.cpp
  2. 14
    5
      Marlin/src/module/motion.h

+ 1
- 1
Marlin/src/feature/pause.cpp View File

@@ -655,7 +655,7 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
655 655
   if (resume_position.e < 0) do_pause_e_move(resume_position.e, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
656 656
 
657 657
   // Move XY to starting position, then Z
658
-  do_blocking_move_to_xy(xy_pos_t(resume_position), feedRate_t(NOZZLE_PARK_XY_FEEDRATE));
658
+  do_blocking_move_to_xy(resume_position, feedRate_t(NOZZLE_PARK_XY_FEEDRATE));
659 659
 
660 660
   // Move Z_AXIS to saved position
661 661
   do_blocking_move_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE));

+ 14
- 5
Marlin/src/module/motion.h View File

@@ -113,7 +113,7 @@ FORCE_INLINE signed char pgm_read_any(const signed char *p) { return pgm_read_by
113 113
 #define XYZ_DEFS(T, NAME, OPT) \
114 114
   extern const XYZval<T> NAME##_P; \
115 115
   FORCE_INLINE T NAME(AxisEnum axis) { return pgm_read_any(&NAME##_P[axis]); } \
116
-  typedef void __void_##OPT##__
116
+  typedef void __void_##OPT##__ /* for semicolon */
117 117
 
118 118
 XYZ_DEFS(float, base_min_pos,   MIN_POS);
119 119
 XYZ_DEFS(float, base_max_pos,   MAX_POS);
@@ -200,10 +200,6 @@ inline void prepare_internal_move_to_destination(const feedRate_t &fr_mm_s=0.0f)
200 200
  * Blocking movement and shorthand functions
201 201
  */
202 202
 void do_blocking_move_to(const float rx, const float ry, const float rz, const feedRate_t &fr_mm_s=0.0f);
203
-void do_blocking_move_to_x(const float &rx, const feedRate_t &fr_mm_s=0.0f);
204
-void do_blocking_move_to_y(const float &ry, const feedRate_t &fr_mm_s=0.0f);
205
-void do_blocking_move_to_z(const float &rz, const feedRate_t &fr_mm_s=0.0f);
206
-void do_blocking_move_to_xy(const float &rx, const float &ry, const feedRate_t &fr_mm_s=0.0f);
207 203
 
208 204
 FORCE_INLINE void do_blocking_move_to(const xy_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) {
209 205
   do_blocking_move_to(raw.x, raw.y, current_position.z, fr_mm_s);
@@ -214,9 +210,22 @@ FORCE_INLINE void do_blocking_move_to(const xyz_pos_t &raw, const feedRate_t &fr
214 210
 FORCE_INLINE void do_blocking_move_to(const xyze_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) {
215 211
   do_blocking_move_to(raw.x, raw.y, raw.z, fr_mm_s);
216 212
 }
213
+
214
+void do_blocking_move_to_xy(const float &rx, const float &ry, const feedRate_t &fr_mm_s=0.0f);
215
+
217 216
 FORCE_INLINE void do_blocking_move_to_xy(const xy_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) {
218 217
   do_blocking_move_to_xy(raw.x, raw.y, fr_mm_s);
219 218
 }
219
+FORCE_INLINE void do_blocking_move_to_xy(const xyz_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) {
220
+  do_blocking_move_to_xy(raw.x, raw.y, fr_mm_s);
221
+}
222
+FORCE_INLINE void do_blocking_move_to_xy(const xyze_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) {
223
+  do_blocking_move_to_xy(raw.x, raw.y, fr_mm_s);
224
+}
225
+
226
+void do_blocking_move_to_x(const float &rx, const feedRate_t &fr_mm_s=0.0f);
227
+void do_blocking_move_to_y(const float &ry, const feedRate_t &fr_mm_s=0.0f);
228
+void do_blocking_move_to_z(const float &rz, const feedRate_t &fr_mm_s=0.0f);
220 229
 
221 230
 void remember_feedrate_and_scaling();
222 231
 void remember_feedrate_scaling_off();

Loading…
Cancel
Save