forked from M-Labs/thermostat
Back out
This commit is contained in:
parent
4c9df5e1a8
commit
da55d07bdb
|
@ -63,15 +63,16 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||
self.thermostat = Thermostat(self, self.report_refresh_spin.value())
|
||||
self._connecting_task = None
|
||||
|
||||
def handle_connection_error():
|
||||
@asyncSlot()
|
||||
async def handle_connection_error():
|
||||
self.info_box.display_info_box(
|
||||
"Connection Error", "Thermostat connection lost. Is it unplugged?"
|
||||
)
|
||||
await self.thermostat.end_session()
|
||||
|
||||
self.thermostat.connection_error.connect(handle_connection_error)
|
||||
|
||||
self.thermostat.connection_error.connect(self.thermostat.timed_out)
|
||||
self.thermostat.connection_error.connect(self.thermostat.end_session)
|
||||
|
||||
self.thermostat.connection_state_changed.connect(self._on_connection_changed)
|
||||
|
||||
|
|
Loading…
Reference in New Issue