PyThermostat: Remove report mode in autotune.py

This commit is contained in:
atse 2024-11-18 17:45:13 +08:00
parent 4beeec6021
commit 764774fbce
1 changed files with 6 additions and 2 deletions

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)