Compare commits

..

14 Commits

Author SHA1 Message Date
2548746fc6 send_command: Better maps to thermostat commands
* Use a `dict` to map values to thermostat parameters. New tag
"thermostat:set_param" used in JSON.

* Remove "activater" option and interpret commands anomalies directly in
send_command
2024-07-19 11:37:15 +08:00
d70ba8aaa0 send_command: Code cleanup
* alias `data` as `new_value` once change is known to be the value

* Remove unneccessary redirection: The child at inner_param's childpath
to the root parameter... is just inner_param.

* Use `in` syntax for checking key existance in `dict`
2024-07-19 11:37:15 +08:00
4690e12432 Fix grammar in info box on PID Autotune failure 2024-07-19 11:37:15 +08:00
4d3d4f4bc1 Don't say settings loaded on settings save 2024-07-19 11:37:15 +08:00
090e34ece1 ctrl_panel: Keep i_set visible when PID engaged
Since i_set is also plotted, we would also want to see its precise value
too.
2024-07-19 11:37:03 +08:00
23c44f63be ctrl_panel: Remove MutexParameter
Use the standard ListParamenter instead, and hook up UI changes
elsewhere.
2024-07-19 11:36:57 +08:00
de26e09c7a ctrl_panel: Limit fixes
* PID Autotune test current should be positive
* Maximum absolute voltage should be 4 V not 5 V
2024-07-19 11:29:24 +08:00
d76e015893 ctrl_panel: Code cleanup
* Remove unnecessary duplication of `THERMOSTAT_PARAMETERS`

* i -> ch

* Separate ParameterTree and Parameter initiation

* Remove extra "channel" option to root parameters, as the "value"
option is already the channel number
2024-07-19 11:27:22 +08:00
c4eb1a2eef ctrl_panel: PID Auto Tune -> PID Autotune 2024-07-19 11:12:54 +08:00
39018d2360 ctrl_panel: Stop crushing spinboxes
It might not be the case on some themes, but on the default Qt theme the
spinbox are a bit too short for the containing numbers. See
https://github.com/pyqtgraph/pyqtgraph/issues/701.
2024-07-19 11:12:52 +08:00
25c7a070d9 ctrl_panel: Approriate units for measured current
Allow the readonly display of current to vary its SI prefix in the unit,
since as a display entry it won't have the unit adjustment problem.
2024-07-19 11:12:40 +08:00
8a4d861672 ctrl_panel: Pin down units for editable fields
Avoids awkward value editing
2024-07-19 11:12:38 +08:00
b668c699fb ctrl_panel: Improve postfilter description 2024-07-19 11:11:59 +08:00
eb3719044f ctrl_panel: Add tooltips
For users' better understanding of what the parameters do
2024-07-19 11:11:55 +08:00

View File

@ -61,7 +61,7 @@
},
{
"name": "target",
"title": "Set Temperature (°C)",
"title": "Setpoint (°C)",
"type": "float",
"visible": false,
"value": 25,
@ -76,7 +76,7 @@
"topic": "pid",
"field": "target"
},
"tip": "The target temperature of the TEC",
"tip": "The temperature setpoint of the TEC",
"lock": false
}
]
@ -134,7 +134,7 @@
"step": 0.1,
"limits": [
0,
5
4
],
"siPrefix": true,
"compactHeight": false,
@ -142,7 +142,7 @@
"topic": "pwm",
"field": "max_v"
},
"tip": "The maximum voltage across the output pins",
"tip": "The maximum voltage (in both directions) across the output pins",
"lock": false
}
]
@ -154,7 +154,7 @@
"title": "Thermistor Settings",
"expanded": true,
"type": "group",
"tip": "Settings of the connected Thermistor, including for the B-Parameter conversion",
"tip": "Settings of the connected thermistor\n- Parameters for the resistance to temperature conversion (with the B-Parameter equation)\n- Settings for the 50/60 Hz filter with the thermistor",
"children": [
{
"name": "t0",
@ -172,7 +172,7 @@
"topic": "s-h",
"field": "t0"
},
"tip": "The origin temperature",
"tip": "The base temperature",
"lock": false
},
{
@ -187,7 +187,7 @@
"topic": "s-h",
"field": "r0"
},
"tip": "The resistance of the thermistor at origin temperature T₀",
"tip": "The resistance of the thermistor at base temperature T₀",
"lock": false
},
{
@ -202,12 +202,12 @@
"topic": "s-h",
"field": "b"
},
"tip": "The B (or Beta) Parameter",
"tip": "The Beta Parameter",
"lock": false
},
{
"name": "rate",
"title": "Postfilter Rejection",
"title": "50/60 Hz filter rejection",
"type": "list",
"value": 16.67,
"thermostat:set_param": {
@ -249,10 +249,9 @@
},
{
"name": "ki",
"title": "Ki",
"title": "Ki (Hz)",
"type": "float",
"step": 0.1,
"suffix": "Hz",
"compactHeight": false,
"thermostat:set_param": {
"topic": "pid",
@ -263,10 +262,9 @@
},
{
"name": "kd",
"title": "Kd",
"title": "Kd (s)",
"type": "float",
"step": 0.1,
"suffix": "s",
"compactHeight": false,
"thermostat:set_param": {
"topic": "pid",
@ -382,7 +380,7 @@
"pid_autotune": {
"params_name": "lookback"
},
"tip": "Amount of time to lookback"
"tip": "Amount of time referenced for tuning"
},
{
"name": "run_pid",
@ -404,7 +402,7 @@
"name": "load",
"title": "Load from flash",
"type": "action",
"tip": "Load settings from flash"
"tip": "Load settings from thermostat"
}
]
}