forked from M-Labs/thermostat
parent
ca7c64c115
commit
998d999b59
|
@ -170,7 +170,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
self.ch1_t_connector = DataConnector(self.ch1_t_plot, max_points=self.DEFAULT_MAX_SAMPLES)
|
||||
self.ch1_i_connector = DataConnector(self.ch1_i_plot, max_points=self.DEFAULT_MAX_SAMPLES)
|
||||
|
||||
self.fan_pwm_recommended = False
|
||||
self.hw_rev_data = None
|
||||
|
||||
self.tec_client = Client()
|
||||
self.client_watcher = ClientWatcher(self, self.tec_client, self.report_refresh_spin.value())
|
||||
|
@ -394,9 +394,9 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
|
||||
def _status(self, hw_rev_d: dict):
|
||||
logging.debug(hw_rev_d)
|
||||
self.hw_rev_data = hw_rev_d
|
||||
self.status_lbl.setText(f"Connected to Thermostat v{hw_rev_d['rev']['major']}.{hw_rev_d['rev']['minor']}")
|
||||
self.fan_group.setEnabled(hw_rev_d["settings"]["fan_available"])
|
||||
self.fan_pwm_recommended = hw_rev_d["settings"]["fan_pwm_recommended"]
|
||||
|
||||
@pyqtSlot(dict)
|
||||
def fan_update(self, fan_settings: dict):
|
||||
|
@ -407,7 +407,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
self.fan_power_slider.setValue(fan_settings["fan_pwm"] or 100) # 0 = PWM off = full strength
|
||||
with QSignalBlocker(self.fan_auto_box):
|
||||
self.fan_auto_box.setChecked(fan_settings["auto_mode"])
|
||||
if not self.fan_pwm_recommended:
|
||||
if not self.hw_rev_data["settings"]["fan_pwm_recommended"]:
|
||||
self._set_fan_pwm_warning()
|
||||
|
||||
@asyncSlot(int)
|
||||
|
@ -418,7 +418,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
with QSignalBlocker(self.fan_auto_box):
|
||||
self.fan_auto_box.setChecked(False)
|
||||
await self.tec_client.set_param("fan", value)
|
||||
if not self.fan_pwm_recommended:
|
||||
if not self.hw_rev_data["settings"]["fan_pwm_recommended"]:
|
||||
self._set_fan_pwm_warning()
|
||||
|
||||
@asyncSlot(int)
|
||||
|
|
Loading…
Reference in New Issue