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

View File

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