PyThermostat: Remove report mode in autotune.py #159

Merged
sb10q merged 1 commits from atse/thermostat:pythermostat-autotune-no-report-mode into master 2024-11-18 19:24:25 +08:00

View File

@ -1,5 +1,6 @@
import math
import logging
import time
from collections import deque, namedtuple
from enum import Enum
@ -236,13 +237,14 @@ def main():
tec = Client()
data = next(tec.report_mode())
data = tec.get_report()
ch = data[channel]
tuner = PIDAutotune(target_temperature, output_step,
lookback, noiseband, ch['interval'])
for data in tec.report_mode():
while True:
data = tec.get_report()
ch = data[channel]
@ -255,6 +257,8 @@ def main():
tec.set_param("output", channel, "i_set", tuner_out)
time.sleep(0.05)
tec.set_param("output", channel, "i_set", 0)