Expand PID Settings on PID engage

This commit is contained in:
atse 2024-07-16 11:29:41 +08:00
parent 5574559ac6
commit 288b94352b
2 changed files with 8 additions and 1 deletions

View File

@ -57,6 +57,13 @@ class CtrlPanel(QObject):
for handle in sigActivated_handles[ch]: for handle in sigActivated_handles[ch]:
param.child(*handle[0]).sigActivated.connect(handle[1]) param.child(*handle[0]).sigActivated.connect(handle[1])
self.params[ch].child("output", "control_method").sigValueChanged.connect(
lambda param, value: param.parent()
.parent()
.child("pid")
.setOpts(expanded=(value == "temperature_pid"))
)
def _indicate_usage(param, control_method="constant_current"): def _indicate_usage(param, control_method="constant_current"):
for item in param.child("i_set").items: for item in param.child("i_set").items:
is_constant_current = control_method == "constant_current" is_constant_current = control_method == "constant_current"

View File

@ -281,7 +281,7 @@
{ {
"name": "pid", "name": "pid",
"title": "PID Settings", "title": "PID Settings",
"expanded": true, "expanded": false,
"type": "group", "type": "group",
"tip": "Settings of PID parameters and clamping", "tip": "Settings of PID parameters and clamping",
"children": [ "children": [