From 96210151d5704a6b6885c37a1a8fbf1ae5fee9ad Mon Sep 17 00:00:00 2001 From: atse Date: Mon, 8 Jul 2024 12:34:02 +0800 Subject: [PATCH] fixup! thermostat part 2 --- pytec/pytec/gui/model/pid_autotuner.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pytec/pytec/gui/model/pid_autotuner.py b/pytec/pytec/gui/model/pid_autotuner.py index cfa2b96..ef26246 100644 --- a/pytec/pytec/gui/model/pid_autotuner.py +++ b/pytec/pytec/gui/model/pid_autotuner.py @@ -37,7 +37,7 @@ class PIDAutoTuner(QObject): async def stop_pid_from_running(self, ch): self.autotuners[ch].setOff() - await self.thermostat.set_param("pwm", ch, "i_set", 0) + await self._thermostat.set_param("pwm", ch, "i_set", 0) @asyncSlot(list) async def tick(self, report): @@ -56,21 +56,21 @@ class PIDAutoTuner(QObject): self.autotuners[ch].run( channel_report["temperature"], channel_report["time"] ) - await self.thermostat.set_param( + await self._thermostat.set_param( "pwm", ch, "i_set", self.autotuners[ch].output() ) case PIDAutotuneState.STATE_SUCCEEDED: kp, ki, kd = self.autotuners[ch].get_tec_pid() self.autotuners[ch].setOff() - await self.thermostat.set_param("pid", ch, "kp", kp) - await self.thermostat.set_param("pid", ch, "ki", ki) - await self.thermostat.set_param("pid", ch, "kd", kd) - await self.thermostat.set_param("pwm", ch, "pid") + await self._thermostat.set_param("pid", ch, "kp", kp) + await self._thermostat.set_param("pid", ch, "ki", ki) + await self._thermostat.set_param("pid", ch, "kd", kd) + await self._thermostat.set_param("pwm", ch, "pid") - await self.thermostat.set_param( + await self._thermostat.set_param( "pid", ch, "target", self.target_temp[ch] ) case PIDAutotuneState.STATE_FAILED: self.autotuners[ch].setOff() - await self.thermostat.set_param("pwm", ch, "i_set", 0) + await self._thermostat.set_param("pwm", ch, "i_set", 0)