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)