Use slider signal argument to set fan value

This commit is contained in:
atse 2023-07-11 11:55:30 +08:00
parent 1849711c62
commit 5e105884d1
1 changed files with 3 additions and 3 deletions

View File

@ -120,11 +120,11 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
with QSignalBlocker(self.fan_auto_box): with QSignalBlocker(self.fan_auto_box):
self.fan_auto_box.setChecked(fan_settings["auto_mode"]) self.fan_auto_box.setChecked(fan_settings["auto_mode"])
@asyncSlot() @asyncSlot(int)
async def fan_set(self): async def fan_set(self, value):
if self.tec_client is None or self.fan_auto_box.isChecked(): if self.tec_client is None or self.fan_auto_box.isChecked():
return return
await self.tec_client.set_param("fan", self.fan_power_slider.value()) await self.tec_client.set_param("fan", value)
@asyncSlot(int) @asyncSlot(int)
async def fan_auto_set(self, enabled): async def fan_auto_set(self, enabled):