forked from M-Labs/thermostat
ctrl_panel: Add tooltips
For users' better understanding of what the parameters do
This commit is contained in:
parent
8ac4a32106
commit
a57c365b8d
@ -42,6 +42,13 @@ class MutexParameter(pTypes.ListParameter):
|
||||
registerParameterType("mutex", MutexParameter)
|
||||
|
||||
|
||||
def set_tree_label_tips(tree):
|
||||
for item in tree.listAllItems():
|
||||
p = item.param
|
||||
if "tip" in p.opts:
|
||||
item.setToolTip(0, p.opts["tip"])
|
||||
|
||||
|
||||
class CtrlPanel(QObject):
|
||||
set_zero_limits_warning_sig = pyqtSignal(list)
|
||||
|
||||
@ -79,6 +86,8 @@ class CtrlPanel(QObject):
|
||||
self.params[i].setValue = self._setValue
|
||||
self.params[i].sigTreeStateChanged.connect(sigTreeStateChanged_handle)
|
||||
|
||||
set_tree_label_tips(tree)
|
||||
|
||||
for handle in sigActivated_handles[i]:
|
||||
self.params[i].child(*handle[0]).sigActivated.connect(handle[1])
|
||||
|
||||
|
@ -5,7 +5,8 @@
|
||||
"title": "Temperature",
|
||||
"type": "float",
|
||||
"format": "{value:.4f} °C",
|
||||
"readonly": true
|
||||
"readonly": true,
|
||||
"tip": "The measured temperature at the thermistor"
|
||||
},
|
||||
{
|
||||
"name": "tec_i",
|
||||
@ -13,13 +14,15 @@
|
||||
"type": "float",
|
||||
"suffix": "mA",
|
||||
"decimals": 6,
|
||||
"readonly": true
|
||||
"readonly": true,
|
||||
"tip": "The measured current through the TEC"
|
||||
},
|
||||
{
|
||||
"name": "output",
|
||||
"title": "Output Settings",
|
||||
"expanded": true,
|
||||
"type": "group",
|
||||
"tip": "Settings of the output to the TEC",
|
||||
"children": [
|
||||
{
|
||||
"name": "control_method",
|
||||
@ -37,6 +40,7 @@
|
||||
"pid"
|
||||
]
|
||||
],
|
||||
"tip": "Select control method of output",
|
||||
"children": [
|
||||
{
|
||||
"name": "i_set",
|
||||
@ -56,6 +60,7 @@
|
||||
"ch",
|
||||
"i_set"
|
||||
],
|
||||
"tip": "The set current through TEC",
|
||||
"lock": false
|
||||
},
|
||||
{
|
||||
@ -74,6 +79,7 @@
|
||||
"ch",
|
||||
"target"
|
||||
],
|
||||
"tip": "The target temperature of the TEC",
|
||||
"lock": false
|
||||
}
|
||||
]
|
||||
@ -83,6 +89,7 @@
|
||||
"title": "Limits",
|
||||
"expanded": true,
|
||||
"type": "group",
|
||||
"tip": "The limits of output, with the polarity at the front panel as reference",
|
||||
"children": [
|
||||
{
|
||||
"name": "max_i_pos",
|
||||
@ -101,6 +108,7 @@
|
||||
"ch",
|
||||
"max_i_pos"
|
||||
],
|
||||
"tip": "The maximum cooling (+ve) current through the output pins",
|
||||
"lock": false
|
||||
},
|
||||
{
|
||||
@ -120,11 +128,12 @@
|
||||
"ch",
|
||||
"max_i_neg"
|
||||
],
|
||||
"tip": "The maximum heating (-ve) current through the output pins",
|
||||
"lock": false
|
||||
},
|
||||
{
|
||||
"name": "max_v",
|
||||
"title": "Max Voltage Difference",
|
||||
"title": "Max Absolute Voltage",
|
||||
"type": "float",
|
||||
"value": 0,
|
||||
"step": 0.1,
|
||||
@ -139,6 +148,7 @@
|
||||
"ch",
|
||||
"max_v"
|
||||
],
|
||||
"tip": "The maximum voltage across the output pins",
|
||||
"lock": false
|
||||
}
|
||||
]
|
||||
@ -150,7 +160,7 @@
|
||||
"title": "Thermistor Settings",
|
||||
"expanded": true,
|
||||
"type": "group",
|
||||
"tip": "Settings of the connected Thermistor",
|
||||
"tip": "Settings of the connected Thermistor, including for the B-Parameter conversion",
|
||||
"children": [
|
||||
{
|
||||
"name": "t0",
|
||||
@ -168,6 +178,7 @@
|
||||
"ch",
|
||||
"t0"
|
||||
],
|
||||
"tip": "The origin temperature",
|
||||
"lock": false
|
||||
},
|
||||
{
|
||||
@ -183,6 +194,7 @@
|
||||
"ch",
|
||||
"r0"
|
||||
],
|
||||
"tip": "The resistance of the thermistor at origin temperature T₀",
|
||||
"lock": false
|
||||
},
|
||||
{
|
||||
@ -198,6 +210,7 @@
|
||||
"ch",
|
||||
"b"
|
||||
],
|
||||
"tip": "The B (or Beta) Parameter",
|
||||
"lock": false
|
||||
},
|
||||
{
|
||||
@ -217,6 +230,7 @@
|
||||
"21.25 Hz": 21.25,
|
||||
"27 Hz": 27.0
|
||||
},
|
||||
"tip": "Trade off effective sampling rate and rejection of (50±1) Hz and (60±1) Hz",
|
||||
"lock": false
|
||||
}
|
||||
]
|
||||
@ -226,6 +240,7 @@
|
||||
"title": "PID Settings",
|
||||
"expanded": true,
|
||||
"type": "group",
|
||||
"tip": "Settings of PID parameters and clamping",
|
||||
"children": [
|
||||
{
|
||||
"name": "kp",
|
||||
@ -238,6 +253,7 @@
|
||||
"ch",
|
||||
"kp"
|
||||
],
|
||||
"tip": "Proportional gain",
|
||||
"lock": false
|
||||
},
|
||||
{
|
||||
@ -251,6 +267,7 @@
|
||||
"ch",
|
||||
"ki"
|
||||
],
|
||||
"tip": "Integral gain",
|
||||
"lock": false
|
||||
},
|
||||
{
|
||||
@ -264,6 +281,7 @@
|
||||
"ch",
|
||||
"kd"
|
||||
],
|
||||
"tip": "Differential gain",
|
||||
"lock": false
|
||||
},
|
||||
{
|
||||
@ -271,6 +289,7 @@
|
||||
"title": "PID Output Clamping",
|
||||
"expanded": true,
|
||||
"type": "group",
|
||||
"tip": "Clamps PID outputs to specified range\nCould be different than output limits",
|
||||
"children": [
|
||||
{
|
||||
"name": "output_min",
|
||||
@ -288,6 +307,7 @@
|
||||
"ch",
|
||||
"output_min"
|
||||
],
|
||||
"tip": "Minimum PID output",
|
||||
"lock": false
|
||||
},
|
||||
{
|
||||
@ -306,6 +326,7 @@
|
||||
"ch",
|
||||
"output_max"
|
||||
],
|
||||
"tip": "Maximum PID output",
|
||||
"lock": false
|
||||
}
|
||||
]
|
||||
@ -315,6 +336,7 @@
|
||||
"title": "PID Auto Tune",
|
||||
"expanded": false,
|
||||
"type": "group",
|
||||
"tip": "Automatically tune PID parameters",
|
||||
"children": [
|
||||
{
|
||||
"name": "target_temp",
|
||||
@ -326,7 +348,8 @@
|
||||
"pid_autotune": [
|
||||
"target_temp",
|
||||
"ch"
|
||||
]
|
||||
],
|
||||
"tip": "The target temperature to autotune for"
|
||||
},
|
||||
{
|
||||
"name": "test_current",
|
||||
@ -343,7 +366,8 @@
|
||||
"pid_autotune": [
|
||||
"test_current",
|
||||
"ch"
|
||||
]
|
||||
],
|
||||
"tip": "The testing current when autotuning"
|
||||
},
|
||||
{
|
||||
"name": "temp_swing",
|
||||
@ -356,7 +380,8 @@
|
||||
"pid_autotune": [
|
||||
"temp_swing",
|
||||
"ch"
|
||||
]
|
||||
],
|
||||
"tip": "The temperature swing around the target"
|
||||
},
|
||||
{
|
||||
"name": "lookback",
|
||||
@ -368,13 +393,14 @@
|
||||
"pid_autotune": [
|
||||
"lookback",
|
||||
"ch"
|
||||
]
|
||||
],
|
||||
"tip": "Amount of time to lookback"
|
||||
},
|
||||
{
|
||||
"name": "run_pid",
|
||||
"title": "Run",
|
||||
"type": "action",
|
||||
"tip": "Run"
|
||||
"tip": "Run PID Autotune with above settings"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user