diff --git a/pytec/pytec/aioclient.py b/pytec/pytec/aioclient.py index 4d9deb3..e723cee 100644 --- a/pytec/pytec/aioclient.py +++ b/pytec/pytec/aioclient.py @@ -44,7 +44,7 @@ class AsyncioClient: pwm_report = await self.get_pwm() for pwm_channel in pwm_report: for limit in ["max_i_neg", "max_i_pos", "max_v"]: - if pwm_channel[limit]["value"] == 0.0: + if pwm_channel[limit] == 0.0: logging.warning( "`{}` limit is set to zero on channel {}".format( limit, pwm_channel["channel"] diff --git a/pytec/pytec/gui/view/ctrl_panel.py b/pytec/pytec/gui/view/ctrl_panel.py index 0e1f89f..1f2ed7e 100644 --- a/pytec/pytec/gui/view/ctrl_panel.py +++ b/pytec/pytec/gui/view/ctrl_panel.py @@ -208,13 +208,13 @@ class CtrlPanel(QObject): ).set_value_with_lock(pwm_params["polarity"]) self.params[channel].child( "output", "limits", "max_v" - ).set_value_with_lock(pwm_params["max_v"]["value"]) + ).set_value_with_lock(pwm_params["max_v"]) self.params[channel].child( "output", "limits", "max_i_pos" - ).set_value_with_lock(pwm_params["max_i_pos"]["value"]) + ).set_value_with_lock(pwm_params["max_i_pos"]) self.params[channel].child( "output", "limits", "max_i_neg" - ).set_value_with_lock(pwm_params["max_i_neg"]["value"]) + ).set_value_with_lock(pwm_params["max_i_neg"]) @pyqtSlot(list) def update_postfilter(self, postfilter_data): diff --git a/pytec/pytec/gui/view/zero_limits_warning_view.py b/pytec/pytec/gui/view/zero_limits_warning_view.py index 116cb3d..a1c2d84 100644 --- a/pytec/pytec/gui/view/zero_limits_warning_view.py +++ b/pytec/pytec/gui/view/zero_limits_warning_view.py @@ -17,7 +17,7 @@ class ZeroLimitsWarningView(QObject): for pwm_params in pwm_data: channel = pwm_params["channel"] for limit in "max_i_pos", "max_i_neg", "max_v": - if pwm_params[limit]["value"] == 0.0: + if pwm_params[limit] == 0.0: channels_zeroed_limits[channel].add(limit) channel_disabled = [False, False]