From 613a3be16716cb31f184164b4ef658d5e19db568 Mon Sep 17 00:00:00 2001 From: ManuelMcLure Date: Thu, 10 May 2018 22:30:51 -0700 Subject: [PATCH] Remove hidden dependencies on destination. Fixes #10686. (#10691) --- Marlin/src/gcode/motion/G2_G3.cpp | 2 +- Marlin/src/gcode/motion/G5.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/src/gcode/motion/G2_G3.cpp b/Marlin/src/gcode/motion/G2_G3.cpp index 47868bb0c..2596e6ca8 100644 --- a/Marlin/src/gcode/motion/G2_G3.cpp +++ b/Marlin/src/gcode/motion/G2_G3.cpp @@ -226,7 +226,7 @@ void plan_arc( // As far as the parser is concerned, the position is now == target. In reality the // motion control system might still be processing the action and the real tool position // in any intermediate location. - set_current_from_destination(); + COPY(current_position, cart); } // plan_arc /** diff --git a/Marlin/src/gcode/motion/G5.cpp b/Marlin/src/gcode/motion/G5.cpp index 684646941..01980e37c 100644 --- a/Marlin/src/gcode/motion/G5.cpp +++ b/Marlin/src/gcode/motion/G5.cpp @@ -27,13 +27,13 @@ #include "../../module/motion.h" #include "../../module/planner_bezier.h" -void plan_cubic_move(const float (&offset)[4]) { - cubic_b_spline(current_position, destination, offset, MMS_SCALED(feedrate_mm_s), active_extruder); +void plan_cubic_move(const float (&cart)[XYZE], const float (&offset)[4]) { + cubic_b_spline(current_position, cart, offset, MMS_SCALED(feedrate_mm_s), active_extruder); // As far as the parser is concerned, the position is now == destination. In reality the // motion control system might still be processing the action and the real tool position // in any intermediate location. - set_current_from_destination(); + COPY(current_position, cart); } /** @@ -69,7 +69,7 @@ void GcodeSuite::G5() { parser.linearval('Q') }; - plan_cubic_move(offset); + plan_cubic_move(destination, offset); } }