From 2b33d1f75af480ebb1a51b52526e65ae1cc4fc7d Mon Sep 17 00:00:00 2001 From: atse Date: Mon, 9 Sep 2024 12:03:19 +0800 Subject: [PATCH] More sensible names --- pytec/tec_qt.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index 3ad478e..5a2d714 100755 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -61,10 +61,14 @@ class MainWindow(QtWidgets.QMainWindow): # Models self._thermostat = Thermostat(self, self.report_refresh_spin.value()) self._connecting_task = None - self._thermostat.connection_state_update.connect(self._on_connection_changed) + self._thermostat.connection_state_update.connect( + self._on_connection_state_changed + ) self._autotuners = PIDAutoTuner(self, self._thermostat, 2) - self._autotuners.autotune_state_changed.connect(self._pid_autotune_handler) + self._autotuners.autotune_state_changed.connect( + self._on_pid_autotune_state_changed + ) # Handlers for disconnections async def autotune_disconnect(): @@ -133,7 +137,7 @@ class MainWindow(QtWidgets.QMainWindow): pass @pyqtSlot(ThermostatConnectionState) - def _on_connection_changed(self, state): + def _on_connection_state_changed(self, state): self.graph_group.setEnabled(state == ThermostatConnectionState.CONNECTED) self.thermostat_settings.setEnabled( state == ThermostatConnectionState.CONNECTED @@ -159,7 +163,7 @@ class MainWindow(QtWidgets.QMainWindow): self.report_box.setChecked(False) @pyqtSlot(int, PIDAutotuneState) - def _pid_autotune_handler(self, _ch, _state): + def _on_pid_autotune_state_changed(self, _ch, _state): ch_tuning = [] for ch in range(self.NUM_CHANNELS): if self._autotuners.get_state(ch) in {