From 405d40c543f3c8412b9dec5bcc1891ea12875ea1 Mon Sep 17 00:00:00 2001 From: atse Date: Thu, 18 Jul 2024 15:49:25 +0800 Subject: [PATCH] Remove extra "channel" option to root parameters Their corresponding channel numbers are already represented with their "value" options. --- pytec/pytec/gui/view/ctrl_panel.py | 3 --- pytec/tec_qt.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pytec/pytec/gui/view/ctrl_panel.py b/pytec/pytec/gui/view/ctrl_panel.py index 267fed6..99432f0 100644 --- a/pytec/pytec/gui/view/ctrl_panel.py +++ b/pytec/pytec/gui/view/ctrl_panel.py @@ -77,9 +77,6 @@ class CtrlPanel(QObject): for ch in range(self.NUM_CHANNELS) ] - for i, param in enumerate(self.params): - param.channel = i - for i, tree in enumerate(self.trees_ui): tree.setHeaderHidden(True) tree.setParameters(self.params[i], showTop=False) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index c964b16..c29ebb6 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -262,7 +262,7 @@ class MainWindow(QtWidgets.QMainWindow): @asyncSlot(object, object) async def send_command(self, param, changes): """Translates parameter tree changes into thermostat set_param calls""" - ch = param.channel + ch = param.value() for inner_param, change, data in changes: if change == "value":