Compare commits

...

2 Commits

Author SHA1 Message Date
ee26f3be62 Control Panel: Move postfilter into its own group
The postfilter is an aspect of the sampling ADC on the Thermostat, and
not the connected thermistor.
2025-04-14 17:14:54 +08:00
dd9e5fe195 Control Panel: Nest readings into its own group
This should be more intuitive to first-time users, as there is explicit
indication to what the reading values are, corresponding to the plotted
values.
2025-03-31 17:55:36 +08:00
2 changed files with 32 additions and 20 deletions

View File

@ -201,13 +201,13 @@ class CtrlPanel(QObject):
"Output Config", "Control Method", "Set Current"
).setValue(settings["i_set"] * 1000)
if settings["temperature"] is not None:
self.params[channel].child("Temperature").setValue(
self.params[channel].child("Readings", "Temperature").setValue(
settings["temperature"]
)
if settings["tec_i"] is not None:
self.params[channel].child("Current through TEC").setValue(
settings["tec_i"] * 1000
)
self.params[channel].child(
"Readings", "Current through TEC"
).setValue(settings["tec_i"] * 1000)
@pyqtSlot(list)
def update_thermistor(self, sh_data):
@ -244,9 +244,9 @@ class CtrlPanel(QObject):
for postfilter_params in postfilter_data:
channel = postfilter_params["channel"]
with QSignalBlocker(self.params[channel]):
self.params[channel].child(
"Thermistor Config", "Postfilter Rate"
).setValue(postfilter_params["rate"])
self.params[channel].child("Postfilter Config", "Rate").setValue(
postfilter_params["rate"]
)
def update_pid_autotune(self, ch, state):
match state:

View File

@ -1,17 +1,23 @@
{
"ctrl_panel": [
{
"name": "Temperature",
"type": "float",
"format": "{value:.4f} °C",
"readonly": true
},
{
"name": "Current through TEC",
"type": "float",
"suffix": "mA",
"decimals": 6,
"readonly": true
"name": "Readings",
"type": "group",
"children": [
{
"name": "Temperature",
"type": "float",
"format": "{value:.4f} °C",
"readonly": true
},
{
"name": "Current through TEC",
"type": "float",
"suffix": "mA",
"decimals": 6,
"readonly": true
}
]
},
{
"name": "Output Config",
@ -181,9 +187,15 @@
"field": "b"
},
"lock": false
},
}
]
},
{
"name": "Postfilter Config",
"type": "group",
"children": [
{
"name": "Postfilter Rate",
"name": "Rate",
"type": "list",
"value": 16.67,
"thermostat:set_param": {