From ca47dffa35eb5b47ea96a872d1208ec5ebf8e130 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 3 Jan 2021 22:22:21 -0600 Subject: [PATCH] Fix delayed_move_time elapsed test --- Marlin/src/MarlinCore.cpp | 2 +- Marlin/src/module/motion.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index c1c2fe061..343700e9f 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -655,7 +655,7 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) { #if ENABLED(DUAL_X_CARRIAGE) // handle delayed move timeout - if (delayed_move_time && ELAPSED(ms, delayed_move_time + 1000UL) && IsRunning()) { + if (delayed_move_time && ELAPSED(ms, delayed_move_time) && IsRunning()) { // travel moves have been received so enact them delayed_move_time = 0xFFFFFFFFUL; // force moves to be done destination = current_position; diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 29ccf619a..6ffb0576c 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -988,7 +988,7 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { if (delayed_move_time != 0xFFFFFFFFUL) { current_position = destination; NOLESS(raised_parked_position.z, destination.z); - delayed_move_time = millis(); + delayed_move_time = millis() + 1000UL; return true; } }