forked from M-Labs/thermostat
Compare commits
3 Commits
69339b998b
...
9763225b45
Author | SHA1 | Date |
---|---|---|
atse | 9763225b45 | |
atse | d682ba4789 | |
atse | 776f8521b6 |
|
@ -204,7 +204,8 @@ class ChannelGraphs:
|
|||
self.t_setpoint_connector.cb_append_data_point(self._t_line.value(), time)
|
||||
else:
|
||||
self.t_setpoint_connector.cb_append_data_point(temperature, time)
|
||||
self.i_connector.cb_append_data_point(current, time)
|
||||
if current is not None:
|
||||
self.i_connector.cb_append_data_point(current, time)
|
||||
self.iset_connector.cb_append_data_point(iset, time)
|
||||
|
||||
def clear(self):
|
||||
|
@ -262,8 +263,10 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
{'name': 'Kp', 'type': 'float', 'step': 0.1, 'suffix': '', 'param': ('pid', ch, 'kp')},
|
||||
{'name': 'Ki', 'type': 'float', 'step': 0.1, 'suffix': 'Hz', 'param': ('pid', ch, 'ki')},
|
||||
{'name': 'Kd', 'type': 'float', 'step': 0.1, 'suffix': 's', 'param': ('pid', ch, 'kd')},
|
||||
{'name': 'Max Current Output', 'type': 'float', 'step': 100, 'limits': (-3000, 3000), 'decimals': 6, 'suffix': 'mA', 'param': ('pid', ch, 'output_max')},
|
||||
{'name': 'Min Current Output', 'type': 'float', 'step': 100, 'limits': (-3000, 3000), 'decimals': 6, 'suffix': 'mA', 'param': ('pid', ch, 'output_min')},
|
||||
{'name': "PID Output Clamping", 'expanded': True, 'type': 'group', 'children': [
|
||||
{'name': 'Minimum', 'type': 'float', 'step': 100, 'limits': (-3000, 3000), 'decimals': 6, 'suffix': 'mA', 'param': ('pid', ch, 'output_min')},
|
||||
{'name': 'Maximum', 'type': 'float', 'step': 100, 'limits': (-3000, 3000), 'decimals': 6, 'suffix': 'mA', 'param': ('pid', ch, 'output_max')},
|
||||
]},
|
||||
{'name': 'PID Auto Tune', 'expanded': False, 'type': 'group', 'children': [
|
||||
{'name': 'Target Temperature', 'type': 'float', 'value': 20, 'step': 0.1, 'format': '{value:.4f} °C'},
|
||||
{'name': 'Test Current', 'type': 'float', 'value': 1000, 'decimals': 6, 'step': 100, 'limits': (-3000, 3000), 'suffix': 'mA'},
|
||||
|
@ -823,8 +826,8 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
self.params[channel].child("PID Config", "Kp").setValue(settings["parameters"]["kp"])
|
||||
self.params[channel].child("PID Config", "Ki").setValue(settings["parameters"]["ki"])
|
||||
self.params[channel].child("PID Config", "Kd").setValue(settings["parameters"]["kd"])
|
||||
self.params[channel].child("PID Config", "Max Current Output").setValue(settings["parameters"]["output_max"] * 1000)
|
||||
self.params[channel].child("PID Config", "Min Current Output").setValue(settings["parameters"]["output_min"] * 1000)
|
||||
self.params[channel].child("PID Config", "PID Output Clamping", "Minimum").setValue(settings["parameters"]["output_min"] * 1000)
|
||||
self.params[channel].child("PID Config", "PID Output Clamping", "Maximum").setValue(settings["parameters"]["output_max"] * 1000)
|
||||
self.params[channel].child("Output Config", "Control Method", "Set Temperature").setValue(settings["target"])
|
||||
self.channel_graphs[channel].set_t_line(temp=round(settings["target"], 6))
|
||||
|
||||
|
|
|
@ -498,7 +498,7 @@
|
|||
</action>
|
||||
<action name="actionLoad_all_configs">
|
||||
<property name="text">
|
||||
<string>Load all configs</string>
|
||||
<string>Load all channel configs from flash</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Restore configuration for all channels from flash</string>
|
||||
|
@ -509,7 +509,7 @@
|
|||
</action>
|
||||
<action name="actionSave_all_configs">
|
||||
<property name="text">
|
||||
<string>Save all configs</string>
|
||||
<string>Save all channel configs to flash</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Save configuration for all channels to flash</string>
|
||||
|
|
|
@ -249,9 +249,9 @@ class Ui_MainWindow(object):
|
|||
self.actionNetwork_Settings.setToolTip(_translate("MainWindow", "Configure IPv4 address, netmask length, and optional default gateway"))
|
||||
self.actionAbout_Thermostat.setText(_translate("MainWindow", "About Thermostat"))
|
||||
self.actionAbout_Thermostat.setToolTip(_translate("MainWindow", "Show Thermostat hardware revision, and settings related to i"))
|
||||
self.actionLoad_all_configs.setText(_translate("MainWindow", "Load all configs"))
|
||||
self.actionLoad_all_configs.setText(_translate("MainWindow", "Load all channel configs from flash"))
|
||||
self.actionLoad_all_configs.setToolTip(_translate("MainWindow", "Restore configuration for all channels from flash"))
|
||||
self.actionSave_all_configs.setText(_translate("MainWindow", "Save all configs"))
|
||||
self.actionSave_all_configs.setText(_translate("MainWindow", "Save all channel configs to flash"))
|
||||
self.actionSave_all_configs.setToolTip(_translate("MainWindow", "Save configuration for all channels to flash"))
|
||||
from pglive.sources.live_plot_widget import LivePlotWidget
|
||||
from pyqtgraph.parametertree import ParameterTree
|
||||
|
|
Loading…
Reference in New Issue