Skip to content

Commit

Permalink
MINTEMP checking is no longer dependent on ambient temperature
Browse files Browse the repository at this point in the history
Instead of constantly checking bed/hotend temp vs. MINTEMP while ambient>MINTEMP,
now we only take the "ambient<MINTEMP" path where we only check bed/hotend temps
vs. MINTEMP *while the heaters are engaged*.

So we can boot up fine in a cold room and sit forever without getting a MINTEMP
error. But if the target temp is > 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.
  • Loading branch information
erik434 committed May 9, 2022
1 parent 4240e07 commit 56729f2
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions Firmware/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 56729f2

Please sign in to comment.