From b198f321c85bd03120fa340036bc915c2cf48236 Mon Sep 17 00:00:00 2001 From: Timm Date: Tue, 1 Oct 2019 02:57:22 +0200 Subject: [PATCH] Add missing motion inline methods (#15433) --- Marlin/src/feature/pause.cpp | 2 +- Marlin/src/module/motion.h | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index ccb6f6323d..60f82e0f05 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -655,7 +655,7 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le if (resume_position.e < 0) do_pause_e_move(resume_position.e, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE)); // Move XY to starting position, then Z - do_blocking_move_to_xy(xy_pos_t(resume_position), feedRate_t(NOZZLE_PARK_XY_FEEDRATE)); + do_blocking_move_to_xy(resume_position, feedRate_t(NOZZLE_PARK_XY_FEEDRATE)); // Move Z_AXIS to saved position do_blocking_move_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE)); diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h index 9ea2ebe529..0da481e4e5 100644 --- a/Marlin/src/module/motion.h +++ b/Marlin/src/module/motion.h @@ -113,7 +113,7 @@ FORCE_INLINE signed char pgm_read_any(const signed char *p) { return pgm_read_by #define XYZ_DEFS(T, NAME, OPT) \ extern const XYZval NAME##_P; \ FORCE_INLINE T NAME(AxisEnum axis) { return pgm_read_any(&NAME##_P[axis]); } \ - typedef void __void_##OPT##__ + typedef void __void_##OPT##__ /* for semicolon */ XYZ_DEFS(float, base_min_pos, MIN_POS); 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) * Blocking movement and shorthand functions */ void do_blocking_move_to(const float rx, const float ry, const float rz, const feedRate_t &fr_mm_s=0.0f); -void do_blocking_move_to_x(const float &rx, const feedRate_t &fr_mm_s=0.0f); -void do_blocking_move_to_y(const float &ry, const feedRate_t &fr_mm_s=0.0f); -void do_blocking_move_to_z(const float &rz, const feedRate_t &fr_mm_s=0.0f); -void do_blocking_move_to_xy(const float &rx, const float &ry, const feedRate_t &fr_mm_s=0.0f); FORCE_INLINE void do_blocking_move_to(const xy_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) { 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 FORCE_INLINE void do_blocking_move_to(const xyze_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) { do_blocking_move_to(raw.x, raw.y, raw.z, fr_mm_s); } + +void do_blocking_move_to_xy(const float &rx, const float &ry, const feedRate_t &fr_mm_s=0.0f); + FORCE_INLINE void do_blocking_move_to_xy(const xy_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) { do_blocking_move_to_xy(raw.x, raw.y, fr_mm_s); } +FORCE_INLINE void do_blocking_move_to_xy(const xyz_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) { + do_blocking_move_to_xy(raw.x, raw.y, fr_mm_s); +} +FORCE_INLINE void do_blocking_move_to_xy(const xyze_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) { + do_blocking_move_to_xy(raw.x, raw.y, fr_mm_s); +} + +void do_blocking_move_to_x(const float &rx, const feedRate_t &fr_mm_s=0.0f); +void do_blocking_move_to_y(const float &ry, const feedRate_t &fr_mm_s=0.0f); +void do_blocking_move_to_z(const float &rz, const feedRate_t &fr_mm_s=0.0f); void remember_feedrate_and_scaling(); void remember_feedrate_scaling_off();