From 75f05aa252ccc7a9d6f0ab21a10ff98dc6a345e6 Mon Sep 17 00:00:00 2001 From: atse Date: Mon, 9 Sep 2024 15:10:30 +0800 Subject: [PATCH] Format --- pytec/tec_qt.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index a65a666..3444ace 100755 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -77,6 +77,7 @@ class MainWindow(QtWidgets.QMainWindow): for ch in range(self.NUM_CHANNELS): if self._autotuners.get_state(ch) != PIDAutotuneState.STATE_OFF: await self._autotuners.stop_pid_from_running(ch) + self._thermostat.disconnect_cb = autotune_disconnect @pyqtSlot() @@ -84,6 +85,7 @@ class MainWindow(QtWidgets.QMainWindow): self._info_box.display_info_box( "Connection Error", "Thermostat connection lost. Is it unplugged?" ) + self._thermostat.connection_error.connect(handle_connection_error) # Control Panel @@ -105,7 +107,7 @@ class MainWindow(QtWidgets.QMainWindow): [ [getattr(self, f"ch{ch}_t_graph"), getattr(self, f"ch{ch}_i_graph")] for ch in range(self.NUM_CHANNELS) - ] + ], ) # Bottom bar menus