From c9e8c4f4a1b2b439058a13a5c019bf6d5cf68b02 Mon Sep 17 00:00:00 2001 From: atse Date: Wed, 30 Aug 2023 11:12:54 +0800 Subject: [PATCH] Don't set_param that much --- pytec/tec_qt.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index 36e19af..a885501 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -628,13 +628,14 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): return for thermostat_param in inner_param.opts["param"]: if len(thermostat_param) == 4: # To tack on prefixes to the data - await self.client.set_param(*thermostat_param[:3], f"{thermostat_param[3]}{data}") + set_param_args = (*thermostat_param[:3], f'{thermostat_param[3]}{data}') elif inner_param.name() == 'Postfilter Rate': - await self.client.set_param(*thermostat_param, *data) + set_param_args = (*thermostat_param, *data) elif inner_param.name() == 'Control Method': - await self.client.set_param(*thermostat_param) + set_param_args = thermostat_param else: - await self.client.set_param(*thermostat_param, data) + set_param_args = (*thermostat_param, data) + await self.client.set_param(*set_param_args) def _set_param_tree(self):