From d3605cfc26074b54071ea26a50bf4a121539a0b4 Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun, 18 Nov 2018 04:53:52 +0100 Subject: [PATCH] Don't start watching heaters when target is 0 (#12453) --- Marlin/src/module/temperature.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index ce483d9144..489a06dc54 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1436,7 +1436,7 @@ void Temperature::init() { #if HOTENDS == 1 UNUSED(e); #endif - if (degHotend(HOTEND_INDEX) < degTargetHotend(HOTEND_INDEX) - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1)) { + if (degTargetHotend(HOTEND_INDEX) && degHotend(HOTEND_INDEX) < degTargetHotend(HOTEND_INDEX) - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1)) { watch_target_temp[HOTEND_INDEX] = degHotend(HOTEND_INDEX) + WATCH_TEMP_INCREASE; watch_heater_next_ms[HOTEND_INDEX] = millis() + (WATCH_TEMP_PERIOD) * 1000UL; } @@ -1452,7 +1452,7 @@ void Temperature::init() { * This is called when the temperature is set. (M140, M190) */ void Temperature::start_watching_bed() { - if (degBed() < degTargetBed() - (WATCH_BED_TEMP_INCREASE + TEMP_BED_HYSTERESIS + 1)) { + if (degTargetBed() && degBed() < degTargetBed() - (WATCH_BED_TEMP_INCREASE + TEMP_BED_HYSTERESIS + 1)) { watch_target_bed_temp = degBed() + WATCH_BED_TEMP_INCREASE; watch_bed_next_ms = millis() + (WATCH_BED_TEMP_PERIOD) * 1000UL; }