From 56729f219161e0d6de7d8a1e4fec3fd57008b7b2 Mon Sep 17 00:00:00 2001 From: erik434 Date: Thu, 10 Feb 2022 12:39:54 -0500 Subject: [PATCH] MINTEMP checking is no longer dependent on ambient temperature Instead of constantly checking bed/hotend temp vs. MINTEMP while ambient>MINTEMP, now we only take the "ambient MINTEMP and the heater has been on for at least 15 seconds (50 seconds for the bed), we'll start enforcing MINTEMP and will die with a MINTEMP error if temps drop below. --- Firmware/temperature.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index cf208a36e9..d7ca6c6927 100755 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -2215,15 +2215,9 @@ static bool bCheckingOnBed=false; // state variable, which allow #ifdef AMBIENT_THERMISTOR #ifdef AMBIENT_MINTEMP check_min_temp_ambient(); -#endif -#if AMBIENT_RAW_LO_TEMP > AMBIENT_RAW_HI_TEMP -if(current_temperature_raw_ambient>(OVERSAMPLENR*MINTEMP_MINAMBIENT_RAW)) // thermistor is NTC type -#else -if(current_temperature_raw_ambient=<(OVERSAMPLENR*MINTEMP_MINAMBIENT_RAW)) -#endif - { // ambient temperature is low +#endif //AMBIENT_MINTEMP #endif //AMBIENT_THERMISTOR -// *** 'common' part of code for MK2.5 & MK3 + // * nozzle checking if(target_temperature[active_extruder]>minttemp[active_extruder]) { // ~ nozzle heating is on @@ -2252,14 +2246,6 @@ else { // ~ bed heating is off oTimer4minTempBed.start(); bCheckingOnBed=false; } -// *** end of 'common' part -#ifdef AMBIENT_THERMISTOR - } -else { // ambient temperature is standard - check_min_temp_heater0(); - check_min_temp_bed(); - } -#endif //AMBIENT_THERMISTOR } #if (defined(FANCHECK) && defined(TACH_0) && (TACH_0 > -1))