Compare commits

...

2 Commits

Author SHA1 Message Date
6565d0af24 Control Panel: Better steps and units in paramtree 2025-04-07 11:19:27 +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 25 additions and 18 deletions

View File

@ -201,13 +201,13 @@ class CtrlPanel(QObject):
"Output Config", "Control Method", "Set Current" "Output Config", "Control Method", "Set Current"
).setValue(settings["i_set"] * 1000) ).setValue(settings["i_set"] * 1000)
if settings["temperature"] is not None: if settings["temperature"] is not None:
self.params[channel].child("Temperature").setValue( self.params[channel].child("Readings", "Temperature").setValue(
settings["temperature"] settings["temperature"]
) )
if settings["tec_i"] is not None: if settings["tec_i"] is not None:
self.params[channel].child("Current through TEC").setValue( self.params[channel].child(
settings["tec_i"] * 1000 "Readings", "Current through TEC"
) ).setValue(settings["tec_i"] * 1000)
@pyqtSlot(list) @pyqtSlot(list)
def update_thermistor(self, sh_data): def update_thermistor(self, sh_data):

View File

@ -1,17 +1,23 @@
{ {
"ctrl_panel": [ "ctrl_panel": [
{ {
"name": "Temperature", "name": "Readings",
"type": "float", "type": "group",
"format": "{value:.4f} °C", "children": [
"readonly": true {
}, "name": "Temperature",
{ "type": "float",
"name": "Current through TEC", "format": "{value:.4f} °C",
"type": "float", "readonly": true
"suffix": "mA", },
"decimals": 6, {
"readonly": true "name": "Current through TEC",
"type": "float",
"suffix": "mA",
"decimals": 6,
"readonly": true
}
]
}, },
{ {
"name": "Output Config", "name": "Output Config",
@ -158,7 +164,7 @@
"name": "R₀", "name": "R₀",
"type": "float", "type": "float",
"value": 10000, "value": 10000,
"step": 1, "step": 100,
"siPrefix": true, "siPrefix": true,
"suffix": "Ω", "suffix": "Ω",
"compactHeight": false, "compactHeight": false,
@ -172,7 +178,7 @@
"name": "B", "name": "B",
"type": "float", "type": "float",
"value": 3950, "value": 3950,
"step": 1, "step": 10,
"suffix": "K", "suffix": "K",
"decimals": 4, "decimals": 4,
"compactHeight": false, "compactHeight": false,
@ -317,7 +323,8 @@
"value": 1.5, "value": 1.5,
"step": 0.1, "step": 0.1,
"prefix": "±", "prefix": "±",
"format": "{value:.4f} °C", "suffix": "K",
"decimals": 4,
"compactHeight": false, "compactHeight": false,
"pid_autotune": "temp_swing" "pid_autotune": "temp_swing"
}, },