From 8c7e98627f7e984335fb44a175984978c36b6098 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 12 Mar 2018 08:05:54 -0500 Subject: [PATCH] Patch do_blocking_move_to so 'destination' can be used --- Marlin/Marlin.h | 8 ++++---- Marlin/Marlin_main.cpp | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 5da03d3d6..7e27bf096 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -468,10 +468,10 @@ void prepare_move_to_destination(); /** * Blocking movement and shorthand functions */ -void do_blocking_move_to(const float &x, const float &y, const float &z, const float &fr_mm_s=0.0); -void do_blocking_move_to_x(const float &x, const float &fr_mm_s=0.0); -void do_blocking_move_to_z(const float &z, const float &fr_mm_s=0.0); -void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s=0.0); +void do_blocking_move_to(const float rx, const float ry, const float rz, const float &fr_mm_s=0.0); +void do_blocking_move_to_x(const float &rx, const float &fr_mm_s=0.0); +void do_blocking_move_to_z(const float &rz, const float &fr_mm_s=0.0); +void do_blocking_move_to_xy(const float &rx, const float &ry, const float &fr_mm_s=0.0); #define HAS_AXIS_UNHOMED_ERR ( \ ENABLED(Z_PROBE_ALLEN_KEY) \ diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index f8ecaddae..67c97986f 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1557,10 +1557,11 @@ inline void buffer_line_to_destination(const float &fr_mm_s) { #endif // IS_KINEMATIC /** - * Plan a move to (X, Y, Z) and set the current_position - * The final current_position may not be the one that was requested + * Plan a move to (X, Y, Z) and set the current_position. + * The final current_position may not be the one that was requested + * Caution: 'destination' is modified by this function. */ -void do_blocking_move_to(const float &rx, const float &ry, const float &rz, const float &fr_mm_s/*=0.0*/) { +void do_blocking_move_to(const float rx, const float ry, const float rz, const float &fr_mm_s/*=0.0*/) { const float old_feedrate_mm_s = feedrate_mm_s; #if ENABLED(DEBUG_LEVELING_FEATURE)