diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index c6bc45f..1347e8c 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -261,7 +261,8 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): {'name': 'Run', 'type': 'action', 'tip': 'Run'}, ]}, ]}, - {'name': 'Save to flash', 'type': 'action', 'tip': 'Save config to thermostat, applies on reset'} + {'name': 'Save to flash', 'type': 'action', 'tip': 'Save config to thermostat, applies on reset'}, + {'name': 'Load from flash', 'type': 'action', 'tip': 'Load config from flash'} ] for ch in range(2)] def __init__(self, args): @@ -643,6 +644,12 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): self.params[i].child('Save to flash').sigActivated.connect(save) + @asyncSlot() + async def load(_, channel=i): + await self.client.load_config(channel) + + self.params[i].child('Load from flash').sigActivated.connect(load) + @pyqtSlot(list) def update_pid(self, pid_settings): for settings in pid_settings: