fix now bug

This commit is contained in:
James Kirikland Garner 2022-12-15 09:22:58 -08:00
parent 656e808f59
commit 83ce8fb5f5

View File

@ -558,10 +558,10 @@ class SimulatedOven(Oven):
self.board.temp_sensor.simulated_temperature = self.t
def heat_then_cool(self):
now_simulator = self.start_time + datetime.timedelta(milliseconds = self.runtime * 1000)
# now_simulator = self.start_time + datetime.timedelta(milliseconds = self.runtime * 1000)
pid = self.pid.compute(self.target,
self.board.temp_sensor.temperature +
config.thermocouple_offset, now_simulator)
config.thermocouple_offset, self.start_time + datetime.timedelta(milliseconds = self.runtime * 1000))
heat_on = float(self.time_step * pid)
heat_off = float(self.time_step * (1 - pid))