From 480de5548fa37294040b169ca8221e3f9aaebb2e Mon Sep 17 00:00:00 2001 From: ximenes Date: Wed, 15 Apr 2020 16:37:33 -0300 Subject: [PATCH 1/3] Fix PSCONV --- siriuspy/siriuspy/devices/psconv.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/siriuspy/siriuspy/devices/psconv.py b/siriuspy/siriuspy/devices/psconv.py index db6b505b7..e0c7cdf1e 100644 --- a/siriuspy/siriuspy/devices/psconv.py +++ b/siriuspy/siriuspy/devices/psconv.py @@ -47,7 +47,14 @@ def value(self, current): @property def limits(self): """Return Property limits.""" - pvname = self.pvnames[0] + # NOTE: improve code. + try: + pvname = self.pvnames[0] + except TypeError: + # is a set + for pvname in self.pvnames: + if pvname.endswith('-SP'): + pvname = self.pvnames pvobj = self.pv_object(pvname) limits = ( pvobj.lower_alarm_limit, From 0707e9abb9ef5ffbb3da9699b9168fc5e70d99ee Mon Sep 17 00:00:00 2001 From: ximenes Date: Wed, 15 Apr 2020 16:48:25 -0300 Subject: [PATCH 2/3] complete fix --- siriuspy/siriuspy/devices/psconv.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/siriuspy/siriuspy/devices/psconv.py b/siriuspy/siriuspy/devices/psconv.py index e0c7cdf1e..18150a396 100644 --- a/siriuspy/siriuspy/devices/psconv.py +++ b/siriuspy/siriuspy/devices/psconv.py @@ -52,9 +52,9 @@ def limits(self): pvname = self.pvnames[0] except TypeError: # is a set - for pvname in self.pvnames: - if pvname.endswith('-SP'): - pvname = self.pvnames + for pvn in self.pvnames: + if pvn.endswith('-SP'): + pvname = pvn pvobj = self.pv_object(pvname) limits = ( pvobj.lower_alarm_limit, From 2c8720609442a27764d77e2d3a4cea425f0ce391 Mon Sep 17 00:00:00 2001 From: ximenes Date: Wed, 15 Apr 2020 16:50:51 -0300 Subject: [PATCH 3/3] Update version --- siriuspy/siriuspy/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/siriuspy/siriuspy/VERSION b/siriuspy/siriuspy/VERSION index 38f77a65b..e9307ca57 100644 --- a/siriuspy/siriuspy/VERSION +++ b/siriuspy/siriuspy/VERSION @@ -1 +1 @@ -2.0.1 +2.0.2