forked from M-Labs/thermostat
Fix updating status label for hwrev = None
This commit is contained in:
parent
3283b126b8
commit
5f30f12875
@ -39,8 +39,8 @@ class Thermostat(QObject, metaclass=PropertyMeta):
|
||||
async def start_session(self, host, port):
|
||||
self.connection_state_changed.emit(ThermostatConnectionState.CONNECTING)
|
||||
await self._client.connect(host, port)
|
||||
self.connection_state_changed.emit(ThermostatConnectionState.CONNECTED)
|
||||
hw_rev_data = await self.get_hw_rev()
|
||||
self.connection_state_changed.emit(ThermostatConnectionState.CONNECTED)
|
||||
self.start_watching()
|
||||
return hw_rev_data
|
||||
|
||||
|
@ -114,6 +114,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
self.thermostat.interval_update.connect(
|
||||
self.autotuners.update_sampling_interval
|
||||
)
|
||||
self.thermostat.hw_rev_update.connect(self._status)
|
||||
self.report_apply_btn.clicked.connect(
|
||||
lambda: self.thermostat.set_update_s(self.report_refresh_spin.value())
|
||||
)
|
||||
@ -163,8 +164,6 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
self.conn_menu.port_set_spin.setEnabled(False)
|
||||
self.connect_btn.setText("Disconnect")
|
||||
|
||||
self._status(self.hw_rev_data)
|
||||
|
||||
case ThermostatConnectionState.CONNECTING:
|
||||
self.status_lbl.setText("Connecting...")
|
||||
self.connect_btn.setText("Stop")
|
||||
|
Loading…
Reference in New Issue
Block a user