From b2658128153f3143bab755c7508659f1d0c335a5 Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Sat, 3 Apr 2021 23:32:10 -0400 Subject: [PATCH 1/2] Block hotend idle check if moves planned or waiting for the user --- Marlin/src/feature/hotend_idle.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Marlin/src/feature/hotend_idle.cpp b/Marlin/src/feature/hotend_idle.cpp index 7f8f20a04793..a460d72e7e96 100644 --- a/Marlin/src/feature/hotend_idle.cpp +++ b/Marlin/src/feature/hotend_idle.cpp @@ -34,6 +34,7 @@ #include "../module/temperature.h" #include "../module/motion.h" +#include "../module/planner.h" #include "../lcd/marlinui.h" extern HotendIdleProtection hotend_idle; @@ -43,7 +44,8 @@ millis_t HotendIdleProtection::next_protect_ms = 0; void HotendIdleProtection::check_hotends(const millis_t &ms) { bool do_prot = false; HOTEND_LOOP() { - if (thermalManager.degHotend(e) >= HOTEND_IDLE_MIN_TRIGGER) { + static bool busy = (TERN0(HAS_RESUME_CONTINUE, wait_for_user) || planner.has_blocks_queued()); + if (thermalManager.degHotend(e) >= HOTEND_IDLE_MIN_TRIGGER && !busy) { do_prot = true; break; } } From b00052242446e306b051a7b84c916ad393b85c2a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 4 Apr 2021 16:47:46 -0500 Subject: [PATCH 2/2] static bad --- Marlin/src/feature/hotend_idle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/feature/hotend_idle.cpp b/Marlin/src/feature/hotend_idle.cpp index a460d72e7e96..911cd20e6ca0 100644 --- a/Marlin/src/feature/hotend_idle.cpp +++ b/Marlin/src/feature/hotend_idle.cpp @@ -44,7 +44,7 @@ millis_t HotendIdleProtection::next_protect_ms = 0; void HotendIdleProtection::check_hotends(const millis_t &ms) { bool do_prot = false; HOTEND_LOOP() { - static bool busy = (TERN0(HAS_RESUME_CONTINUE, wait_for_user) || planner.has_blocks_queued()); + const bool busy = (TERN0(HAS_RESUME_CONTINUE, wait_for_user) || planner.has_blocks_queued()); if (thermalManager.degHotend(e) >= HOTEND_IDLE_MIN_TRIGGER && !busy) { do_prot = true; break; }