From 02aa93a6ad3047eeac2648fb689b6fb77862ca29 Mon Sep 17 00:00:00 2001
From: AnHardt <github@kitelab.de>
Date: Tue, 28 Nov 2017 17:03:51 +0100
Subject: [PATCH] Fix Watchdog time out during long lasting DELTA moves
During long lasting moves of a delta machine neither the temperatures are maintained nor buttons checked nor ... .
The fix is to call 'manage_heater()' and 'idle()' every now and then in the loop where the move is segmented.
The code is abot the same as in G2_G3 wher we had the same problem with too large circles lasting too long.
Fixing #7510
---
Marlin/src/module/motion.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp
index 045a088dfe..c026712c68 100644
--- a/Marlin/src/module/motion.cpp
+++ b/Marlin/src/module/motion.cpp
@@ -594,6 +594,14 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS },
// Calculate and execute the segments
for (uint16_t s = segments + 1; --s;) {
+
+ static millis_t next_idle_ms = millis() + 200UL;
+ thermalManager.manage_heater(); // This returns immediately if not really needed.
+ if (ELAPSED(millis(), next_idle_ms)) {
+ next_idle_ms = millis() + 200UL;
+ idle();
+ }
+
LOOP_XYZE(i) raw[i] += segment_distance[i];
#if ENABLED(DELTA)
DELTA_RAW_IK(); // Delta can inline its kinematics
--
GitLab