fixup! Clear Graph UI changes

This commit is contained in:
atse 2024-08-28 10:52:12 +08:00
parent 209ea365c2
commit ff4aa61b1e

View File

@ -17,7 +17,9 @@ class LiveDataPlotter(QObject):
self._thermostat.report_update.connect(self.update_report) self._thermostat.report_update.connect(self.update_report)
self._thermostat.pid_update.connect(self.update_pid) self._thermostat.pid_update.connect(self.update_pid)
self._thermostat.connection_state_changed.connect() self._thermostat.connection_state_changed.connect(
self.thermostat_state_change_handler
)
self.NUM_CHANNELS = len(live_plots) self.NUM_CHANNELS = len(live_plots)
self.graphs = [] self.graphs = []
@ -28,7 +30,7 @@ class LiveDataPlotter(QObject):
self.graphs.append(_TecGraphs(live_plot[0], live_plot[1])) self.graphs.append(_TecGraphs(live_plot[0], live_plot[1]))
@pyqtSlot(ThermostatConnectionState) @pyqtSlot(ThermostatConnectionState)
def conn(self, state): def thermostat_state_change_handler(self, state):
if state == ThermostatConnectionState.DISCONNECTED: if state == ThermostatConnectionState.DISCONNECTED:
self.clear_graphs() self.clear_graphs()