Browse Source

Fix thermal runaway timeout

pull/1/head
Scott Lahteine 8 years ago
committed by GitHub
parent
commit
c63cb45268
  1. 6
      Marlin/temperature.cpp

6
Marlin/temperature.cpp

@ -1241,12 +1241,12 @@ void Temperature::init() {
*state = TRStable;
// While the temperature is stable watch for a bad temperature
case TRStable:
if (temperature < tr_target_temperature[heater_index] - hysteresis_degc && ELAPSED(millis(), *timer))
*state = TRRunaway;
else {
if (temperature >= tr_target_temperature[heater_index] - hysteresis_degc) {
*timer = millis() + period_seconds * 1000UL;
break;
}
else if (PENDING(millis(), *timer)) break;
*state = TRRunaway;
case TRRunaway:
_temp_error(heater_id, PSTR(MSG_T_THERMAL_RUNAWAY), PSTR(MSG_THERMAL_RUNAWAY));
}

Loading…
Cancel
Save