Merge pull request #34 from adq/tuning-cleanup

fix tuner heat()/cool() calls
This commit is contained in:
Jason Bruce 2021-10-15 13:01:39 -04:00 committed by GitHub
commit 5860aad2bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -46,7 +46,7 @@ def recordprofile(csvfile, targettemp):
try:
stage = 'heating'
if not config.simulate:
oven.output.heat(1, tuning=True)
oven.output.heat(0)
while True:
temp = oven.board.temp_sensor.temperature + \
@ -58,7 +58,7 @@ def recordprofile(csvfile, targettemp):
if stage == 'heating':
if temp >= targettemp:
if not config.simulate:
oven.output.heat(0)
oven.output.cool(0)
stage = 'cooling'
elif stage == 'cooling':
@ -73,7 +73,7 @@ def recordprofile(csvfile, targettemp):
finally:
# ensure we always shut the oven down!
if not config.simulate:
oven.output.heat(0)
oven.output.cool(0)
def line(a, b, x):

View File

@ -27,10 +27,8 @@ class Output(object):
log.warning(msg)
self.active = False
def heat(self,sleepfor, tuning=False):
def heat(self,sleepfor):
self.GPIO.output(config.gpio_heat, self.GPIO.HIGH)
if tuning:
return
time.sleep(sleepfor)
def cool(self,sleepfor):