forked from M-Labs/thermostat
Stuff non-UI changes in Thermostat model
This commit is contained in:
parent
78ba799d56
commit
0eebc0a6df
@ -37,6 +37,7 @@ class Thermostat(QObject, metaclass=PropertyMeta):
|
||||
|
||||
async def start_session(self, host, port):
|
||||
await self._client.connect(host, port)
|
||||
self.start_watching()
|
||||
|
||||
async def run(self):
|
||||
self._update_params_task = asyncio.create_task(self.update_params())
|
||||
@ -104,6 +105,8 @@ class Thermostat(QObject, metaclass=PropertyMeta):
|
||||
]
|
||||
|
||||
async def end_session(self):
|
||||
await self.set_report_mode(False)
|
||||
self.stop_watching()
|
||||
await self._client.disconnect()
|
||||
self.connection_errored = False
|
||||
|
||||
|
@ -181,7 +181,6 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
logging.debug(self.hw_rev_data)
|
||||
|
||||
self._status(self.hw_rev_data)
|
||||
self.thermostat.start_watching()
|
||||
|
||||
case ThermostatConnectionState.CONNECTING:
|
||||
self.status_lbl.setText("Connecting...")
|
||||
@ -213,8 +212,6 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
self.autotuners.autotuners[ch].setOff()
|
||||
else:
|
||||
await self.autotuners.stop_pid_from_running(ch)
|
||||
await self.thermostat.set_report_mode(False)
|
||||
self.thermostat.stop_watching()
|
||||
|
||||
def _status(self, hw_rev_d: dict):
|
||||
logging.debug(hw_rev_d)
|
||||
|
Loading…
Reference in New Issue
Block a user