From 6cc4dd10bc5504c38263b57ecf7e8b1e3d06e44e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 27 Jul 2023 17:20:03 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20hotend=20idle=20timeout=20?= =?UTF-8?q?checks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/hotend_idle.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/feature/hotend_idle.cpp b/Marlin/src/feature/hotend_idle.cpp index f64fe7e3cf..050898e3b5 100644 --- a/Marlin/src/feature/hotend_idle.cpp +++ b/Marlin/src/feature/hotend_idle.cpp @@ -55,15 +55,15 @@ void HotendIdleProtection::check_hotends(const millis_t &ms) { if (!do_prot) next_protect_ms = 0; // No hotends are hot so cancel timeout else if (!next_protect_ms) // Timeout is possible? - next_protect_ms = ms + cfg.timeout * 1000; // Start timeout if not already set + next_protect_ms = ms + 1000UL * cfg.timeout; // Start timeout if not already set } void HotendIdleProtection::check_e_motion(const millis_t &ms) { static float old_e_position = 0; if (old_e_position != current_position.e) { - old_e_position = current_position.e; // Track filament motion - if (next_protect_ms) // If some heater is on then... - next_protect_ms = ms + cfg.timeout * 1000; // ...delay the timeout till later + old_e_position = current_position.e; // Track filament motion + if (next_protect_ms) // If some heater is on then... + next_protect_ms = ms + 1000UL * cfg.timeout; // ...delay the timeout till later } }