Load config

zotino-tec
atse 2023-08-29 12:27:19 +08:00
parent 5bb64e577f
commit fe7bc5b7e5
1 changed files with 8 additions and 1 deletions

View File

@ -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: