forked from M-Labs/thermostat
fixup! thermostat part 2
This commit is contained in:
parent
684d123d6f
commit
96210151d5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user