fixed bug where restarts and emergencies competed

kiln-profiles
jbruce 2022-06-24 08:32:43 -04:00
rodzic fddf22e6bf
commit b71d4f9d78
1 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -255,27 +255,27 @@ class Oven(threading.Thread):
config.emergency_shutoff_temp): config.emergency_shutoff_temp):
log.info("emergency!!! temperature too high") log.info("emergency!!! temperature too high")
if not config.ignore_emergencies == True: if not config.ignore_emergencies == True:
self.reset() self.abort_run()
if self.board.temp_sensor.noConnection: if self.board.temp_sensor.noConnection:
log.info("emergency!!! lost connection to thermocouple") log.info("emergency!!! lost connection to thermocouple")
if not config.ignore_emergencies == True: if not config.ignore_emergencies == True:
self.reset() self.abort_run()
if self.board.temp_sensor.unknownError: if self.board.temp_sensor.unknownError:
log.info("emergency!!! unknown thermocouple error") log.info("emergency!!! unknown thermocouple error")
if not config.ignore_emergencies == True: if not config.ignore_emergencies == True:
self.reset() self.abort_run()
if self.board.temp_sensor.bad_percent > 30: if self.board.temp_sensor.bad_percent > 30:
log.info("emergency!!! too many errors in a short period") log.info("emergency!!! too many errors in a short period")
if not config.ignore_emergencies == True: if not config.ignore_emergencies == True:
self.reset() self.abort_run()
def reset_if_schedule_ended(self): def reset_if_schedule_ended(self):
if self.runtime > self.totaltime: if self.runtime > self.totaltime:
log.info("schedule ended, shutting down") log.info("schedule ended, shutting down")
self.reset() self.abort_run()
def get_state(self): def get_state(self):
temp = 0 temp = 0