From 7dec8071b2698ed0a6419f0fe3c64ddf7085532c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 21 Sep 2016 17:37:05 -0500 Subject: [PATCH] Always synchronize in Stepper::set_position --- Marlin/stepper.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index a7eccd8779..71f33a6902 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -936,6 +936,9 @@ void Stepper::synchronize() { while (planner.blocks_queued()) idle(); } * derive the current XYZ position later on. */ void Stepper::set_position(const long& x, const long& y, const long& z, const long& e) { + + synchronize(); // Bad to set stepper counts in the middle of a move + CRITICAL_SECTION_START; #if ENABLED(COREXY)