From 05c2f8082683bc4813f16f9c460182666a7966bf Mon Sep 17 00:00:00 2001 From: kAdonis <35379348+kAdonis@users.noreply.github.com> Date: Sat, 2 Mar 2019 23:29:10 +0100 Subject: [PATCH] Fix bug in wait-for-heatup (#13290) --- Marlin/src/module/temperature.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 6f5c8e226..69a8c835f 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2887,8 +2887,10 @@ void Temperature::isr() { if (!residency_start_ms) { // Start the TEMP_BED_RESIDENCY_TIME timer when we reach target temp for the first time. - if (temp_diff < TEMP_BED_WINDOW) residency_start_ms = now; - if (first_loop) residency_start_ms += (TEMP_BED_RESIDENCY_TIME) * 1000UL; + if (temp_diff < TEMP_BED_WINDOW) { + residency_start_ms = now; + if (first_loop) residency_start_ms += (TEMP_BED_RESIDENCY_TIME) * 1000UL; + } } else if (temp_diff > TEMP_BED_HYSTERESIS) { // Restart the timer whenever the temperature falls outside the hysteresis.