From 1a5293c2ce23fdc50a40b2056910540a48d6d3ce Mon Sep 17 00:00:00 2001 From: Richard Miles Date: Sun, 5 Apr 2015 22:27:14 +0100 Subject: [PATCH] Prevents MINTEMP / MAXTEMP when no heaters present This commit checks whether or not HEATER_0 is in use, and if not, skips the MIN / MAX temperature checks. --- Marlin/temperature.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 28e1afb7cef3..b8403f3c747c 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -1525,15 +1525,17 @@ ISR(TIMER0_COMPB_vect) { for (int i = 0; i < 4; i++) raw_temp_value[i] = 0; raw_temp_bed_value = 0; - #ifndef HEATER_0_USES_MAX6675 - #if HEATER_0_RAW_LO_TEMP > HEATER_0_RAW_HI_TEMP - #define GE0 <= - #else - #define GE0 >= - #endif - if (current_temperature_raw[0] GE0 maxttemp_raw[0]) max_temp_error(0); - if (minttemp_raw[0] GE0 current_temperature_raw[0]) min_temp_error(0); - #endif + #if HAS_TEMP_0 + #ifndef HEATER_0_USES_MAX6675 + #if HEATER_0_RAW_LO_TEMP > HEATER_0_RAW_HI_TEMP + #define GE0 <= + #else + #define GE0 >= + #endif + if (current_temperature_raw[0] GE0 maxttemp_raw[0]) max_temp_error(0); + if (minttemp_raw[0] GE0 current_temperature_raw[0]) min_temp_error(0); + #endif + #endif #if HAS_TEMP_1 #if HEATER_1_RAW_LO_TEMP > HEATER_1_RAW_HI_TEMP