From 81aab828e2bceb7ad83170a6816263f2be1d6b4a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 11 Mar 2016 05:07:18 -0800 Subject: [PATCH] Fix a "Heating failed" error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addressing #3085. If the target_temperature is set directly it never invokes or disables the timer set in `start_watching_heater`, so after _stopping a print_ or turning off _all heaters_ you could get a “Heating failed” error. --- Marlin/temperature.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 9beffc4e7d..63a5839080 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -1112,13 +1112,13 @@ void disable_all_heaters() { setTargetBed(0); #define DISABLE_HEATER(NR) { \ - target_temperature[NR] = 0; \ + setTargetHotend(NR, 0); \ soft_pwm[NR] = 0; \ WRITE_HEATER_ ## NR (LOW); \ } -#if HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675) - target_temperature[0] = 0; + #if HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675) + setTargetHotend(0, 0); soft_pwm[0] = 0; WRITE_HEATER_0P(LOW); // Should HEATERS_PARALLEL apply here? Then change to DISABLE_HEATER(0) #endif