forked from M-Labs/thermostat
Swap order connected first
This commit is contained in:
parent
04a8f5ea56
commit
b8d0cdabd3
|
@ -118,15 +118,15 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||||
self.ip_set_line.setEnabled(not result)
|
self.ip_set_line.setEnabled(not result)
|
||||||
self.port_set_spin.setEnabled(not result)
|
self.port_set_spin.setEnabled(not result)
|
||||||
self.connect_btn.setText("Disconnect" if result else "Connect")
|
self.connect_btn.setText("Disconnect" if result else "Connect")
|
||||||
if not result:
|
if result:
|
||||||
|
self.client_watcher.start_watching()
|
||||||
|
self._status(await self.tec_client.hw_rev())
|
||||||
|
self.fan_update(await self.tec_client.fan())
|
||||||
|
else:
|
||||||
self.status_lbl.setText("Disconnected")
|
self.status_lbl.setText("Disconnected")
|
||||||
self.fan_pwm_warning.setPixmap(QtGui.QPixmap())
|
self.fan_pwm_warning.setPixmap(QtGui.QPixmap())
|
||||||
self.fan_pwm_warning.setToolTip("")
|
self.fan_pwm_warning.setToolTip("")
|
||||||
self.client_watcher.stop_watching()
|
self.client_watcher.stop_watching()
|
||||||
else:
|
|
||||||
self.client_watcher.start_watching()
|
|
||||||
self._status(await self.tec_client.hw_rev())
|
|
||||||
self.fan_update(await self.tec_client.fan())
|
|
||||||
|
|
||||||
def _set_fan_pwm_warning(self):
|
def _set_fan_pwm_warning(self):
|
||||||
if self.fan_power_slider.value() != 100:
|
if self.fan_power_slider.value() != 100:
|
||||||
|
|
Loading…
Reference in New Issue