ctrl_panel: Add polarity option in output settings

This commit is contained in:
atse 2024-10-07 16:23:26 +08:00
parent b1e5a843eb
commit 7f1223b1b9
2 changed files with 17 additions and 1 deletions

View File

@ -203,6 +203,9 @@ class CtrlPanel(QObject):
for pwm_params in pwm_data:
channel = pwm_params["channel"]
with QSignalBlocker(self.params[channel]):
self.params[channel].child(
"output", "polarity"
).set_value_with_lock(pwm_params["polarity"])
self.params[channel].child(
"output", "limits", "max_v"
).set_value_with_lock(pwm_params["max_v"]["value"])

View File

@ -34,6 +34,19 @@
"type": "group",
"tip": "Settings of the output to the TEC",
"children": [
{
"name": "polarity",
"title": "Polarity",
"type": "list",
"limits": {
"Normal": "normal",
"Reversed": "reversed"
},
"thermostat:set_param": {
"topic": "pwm",
"field": "polarity"
}
},
{
"name": "control_method",
"title": "Control Method",