From 4c839f079b1f6723cb1cbe6f9332106fa095e29a Mon Sep 17 00:00:00 2001 From: atse Date: Wed, 23 Aug 2023 14:53:00 +0800 Subject: [PATCH] Absolute --- pytec/tec_qt.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index afabd5a..867a6c3 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -133,10 +133,10 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): 'suffix': '°C', 'param': [('pid', ch, 'target')]}, ]}, {'name': 'Output Config', 'expanded': False, 'type': 'group', 'children': [ - {'name': 'Max Current', 'type': 'float', 'value': 0, 'step': 0.1, 'limits': (0, 3), 'siPrefix': True, 'prefix': '±', + {'name': 'Max Absolute Current', 'type': 'float', 'value': 0, 'step': 0.1, 'limits': (0, 3), 'siPrefix': True, 'suffix': 'A', 'commands': [f'pwm {ch} max_i_pos {{value}}', f'pwm {ch} max_i_neg {{value}}', f'pid {ch} output_min -{{value}}', f'pid {ch} output_max {{value}}']}, - {'name': 'Max Voltage', 'type': 'float', 'value': 0, 'step': 0.1, 'limits': (0, 5), 'siPrefix': True, + {'name': 'Max Absolute Voltage', 'type': 'float', 'value': 0, 'step': 0.1, 'limits': (0, 5), 'siPrefix': True, 'suffix': 'V', 'param': [('pwm', ch, 'max_v')]}, ]}, {'name': 'Thermistor Config', 'expanded': False, 'type': 'group', 'children': [ @@ -642,8 +642,8 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): for pwm_params in pwm_data: channel = pwm_params["channel"] with QSignalBlocker(self.params[channel]): - self.params[channel].child("Output Config", "Max Voltage").setValue(pwm_params["max_v"]["value"]) - self.params[channel].child("Output Config", "Max Current").setValue(pwm_params["max_i_pos"]["value"]) + self.params[channel].child("Output Config", "Max Absolute Voltage").setValue(pwm_params["max_v"]["value"]) + self.params[channel].child("Output Config", "Max Absolute Current").setValue(pwm_params["max_i_pos"]["value"]) @pyqtSlot(list) def update_postfilter(self, postfilter_data):