Fix Slot decorators and types

This commit is contained in:
atse 2023-07-11 12:27:43 +08:00
parent 9f839f4bd9
commit fca4b061ee
1 changed files with 7 additions and 6 deletions

View File

@ -29,10 +29,10 @@ def get_argparser():
class ClientWatcher(QObject):
fan_update = pyqtSignal(object)
pwm_update = pyqtSignal(object)
report_update = pyqtSignal(object)
pid_update = pyqtSignal(object)
fan_update = pyqtSignal(dict)
pwm_update = pyqtSignal(list)
report_update = pyqtSignal(list)
pid_update = pyqtSignal(list)
def __init__(self, parent, client, update_s):
self.update_s = update_s
@ -60,7 +60,7 @@ class ClientWatcher(QObject):
self.running = False
self.watch_task.cancel()
@pyqtSlot()
@pyqtSlot(float)
def set_update_s(self, update_s):
self.update_s = update_s
@ -118,7 +118,8 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
self.fan_group.setEnabled(hw_rev_d["settings"]["fan_available"])
self.fan_pwm_recommended = hw_rev_d["settings"]["fan_pwm_recommended"]
def fan_update(self, fan_settings):
@pyqtSlot(dict)
def fan_update(self, fan_settings: dict):
logging.debug(fan_settings)
if fan_settings is None:
return