From 79405ce2afd2a3d36ecb70274ec7a5355a7765c8 Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Thu, 8 Jul 2021 21:48:11 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20manage=5Fheaters=20recursi?= =?UTF-8?q?on=20on=20servo=20move=20(#22313)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to e297748b22 --- Marlin/src/module/temperature.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 83187259ff..3b3c769866 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1236,6 +1236,10 @@ void Temperature::min_temp_error(const heater_id_t heater_id) { void Temperature::manage_heater() { if (marlin_state == MF_INITIALIZING) return watchdog_refresh(); // If Marlin isn't started, at least reset the watchdog! + static bool no_reentry = false; // Prevent recursion + if (no_reentry) return; + REMEMBER(mh, no_reentry, true); + #if ENABLED(EMERGENCY_PARSER) if (emergency_parser.killed_by_M112) kill(M112_KILL_STR, nullptr, true);