From ac283ebe795f5490954995040976a92b849007be Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Sat, 3 Jul 2021 17:13:14 +0100 Subject: [PATCH 1/2] remove unnecessary heat() tuning parameter --- kiln-tuner.py | 4 ++-- lib/oven.py | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/kiln-tuner.py b/kiln-tuner.py index 8868295..f9116d6 100755 --- a/kiln-tuner.py +++ b/kiln-tuner.py @@ -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 + \ @@ -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): diff --git a/lib/oven.py b/lib/oven.py index 35b7288..5d6b13a 100644 --- a/lib/oven.py +++ b/lib/oven.py @@ -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): From 3914316a3174ad6d997e02d80edc0e6baf9c42d3 Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Sat, 3 Jul 2021 17:15:16 +0100 Subject: [PATCH 2/2] fix call to cool() --- kiln-tuner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kiln-tuner.py b/kiln-tuner.py index f9116d6..aeaf13b 100755 --- a/kiln-tuner.py +++ b/kiln-tuner.py @@ -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':