Skip to content

Commit

Permalink
Update oven.py
Browse files Browse the repository at this point in the history
  • Loading branch information
benkrasnow authored Jun 9, 2018
1 parent 35eb7d3 commit 377e27e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/oven.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ def run(self):
self.reset()
else:
temperature_count = 0

#Capture the last temperature value. This must be done before set_heat, since there is a sleep in there now.
last_temp = self.temp_sensor.temperature

self.set_heat(pid)

Expand All @@ -151,8 +154,7 @@ def run(self):
if self.runtime >= self.totaltime:
self.reset()

#Capture the last temperature value
last_temp = self.temp_sensor.temperature

if pid > 0:
time.sleep(self.time_step * (1 - pid))
else:
Expand Down

0 comments on commit 377e27e

Please sign in to comment.