forked from M-Labs/thermostat
ctrl_panel: PID Auto Tune -> PID Autotune
This commit is contained in:
parent
abecac44d6
commit
1221ac4436
@ -337,7 +337,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pid_autotune",
|
"name": "pid_autotune",
|
||||||
"title": "PID Auto Tune",
|
"title": "PID Autotune",
|
||||||
"expanded": false,
|
"expanded": false,
|
||||||
"type": "group",
|
"type": "group",
|
||||||
"tip": "Automatically tune PID parameters",
|
"tip": "Automatically tune PID parameters",
|
||||||
|
@ -82,7 +82,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
[["load"], partial(self.thermostat.load_cfg, ch)],
|
[["load"], partial(self.thermostat.load_cfg, ch)],
|
||||||
[
|
[
|
||||||
["pid", "pid_autotune", "run_pid"],
|
["pid", "pid_autotune", "run_pid"],
|
||||||
partial(self.pid_auto_tune_request, ch),
|
partial(self.pid_autotune_request, ch),
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
for ch in range(self.NUM_CHANNELS)
|
for ch in range(self.NUM_CHANNELS)
|
||||||
@ -283,10 +283,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
param.child(*param.childPath(inner_param)).setOpts(lock=False)
|
param.child(*param.childPath(inner_param)).setOpts(lock=False)
|
||||||
|
|
||||||
if inner_param.opts.get("pid_autotune", None) is not None:
|
if inner_param.opts.get("pid_autotune", None) is not None:
|
||||||
auto_tuner_param = inner_param.opts["pid_autotune"][0]
|
autotuner_param = inner_param.opts["pid_autotune"][0]
|
||||||
if inner_param.opts["pid_autotune"][1] != "ch":
|
if inner_param.opts["pid_autotune"][1] != "ch":
|
||||||
ch = inner_param.opts["pid_autotune"][1]
|
ch = inner_param.opts["pid_autotune"][1]
|
||||||
self.autotuners.set_params(auto_tuner_param, ch, data)
|
self.autotuners.set_params(autotuner_param, ch, data)
|
||||||
|
|
||||||
if inner_param.opts.get("activaters", None) is not None:
|
if inner_param.opts.get("activaters", None) is not None:
|
||||||
activater = inner_param.opts["activaters"][
|
activater = inner_param.opts["activaters"][
|
||||||
@ -298,7 +298,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
await self.client.set_param(*activater)
|
await self.client.set_param(*activater)
|
||||||
|
|
||||||
@asyncSlot()
|
@asyncSlot()
|
||||||
async def pid_auto_tune_request(self, ch=0):
|
async def pid_autotune_request(self, ch=0):
|
||||||
match self.autotuners.get_state(ch):
|
match self.autotuners.get_state(ch):
|
||||||
case PIDAutotuneState.STATE_OFF | PIDAutotuneState.STATE_FAILED:
|
case PIDAutotuneState.STATE_OFF | PIDAutotuneState.STATE_FAILED:
|
||||||
self.autotuners.load_params_and_set_ready(ch)
|
self.autotuners.load_params_and_set_ready(ch)
|
||||||
|
Loading…
Reference in New Issue
Block a user