From fca4b061ee7cf0111aba4c53ff39aa0378880dfc Mon Sep 17 00:00:00 2001 From: atse Date: Tue, 11 Jul 2023 12:27:43 +0800 Subject: [PATCH] Fix Slot decorators and types --- pytec/tec_qt.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index 7ac6560..e1098ae 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -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