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