Bladeren bron

Fix thermal runaway timeout

Scott Lahteine 8 jaren geleden
bovenliggende
commit
c63cb45268
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 3
    3
      Marlin/temperature.cpp

+ 3
- 3
Marlin/temperature.cpp Bestand weergeven

@@ -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
     }

Laden…
Annuleren
Opslaan