- fix for folks using kiln_must_catch_up setting. fixed a time slipping
issue when this setting is used.
This commit is contained in:
parent
1450662aea
commit
cae9b166ca
@ -217,13 +217,11 @@ class Oven(threading.Thread):
|
|||||||
# kiln too cold, wait for it to heat up
|
# kiln too cold, wait for it to heat up
|
||||||
if self.target - temp > config.kiln_must_catch_up_max_error:
|
if self.target - temp > config.kiln_must_catch_up_max_error:
|
||||||
log.info("kiln must catch up, too cold, shifting schedule")
|
log.info("kiln must catch up, too cold, shifting schedule")
|
||||||
self.start_time = self.start_time + \
|
self.start_time = datetime.datetime.now() - datetime.timedelta(milliseconds = self.runtime * 1000)
|
||||||
datetime.timedelta(seconds=self.time_step)
|
|
||||||
# kiln too hot, wait for it to cool down
|
# kiln too hot, wait for it to cool down
|
||||||
if temp - self.target > config.kiln_must_catch_up_max_error:
|
if temp - self.target > config.kiln_must_catch_up_max_error:
|
||||||
log.info("kiln must catch up, too hot, shifting schedule")
|
log.info("kiln must catch up, too hot, shifting schedule")
|
||||||
self.start_time = self.start_time + \
|
self.start_time = datetime.datetime.now() - datetime.timedelta(milliseconds = self.runtime * 1000)
|
||||||
datetime.timedelta(seconds=self.time_step)
|
|
||||||
|
|
||||||
def update_runtime(self):
|
def update_runtime(self):
|
||||||
runtime_delta = datetime.datetime.now() - self.start_time
|
runtime_delta = datetime.datetime.now() - self.start_time
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user