From a2a4c8dbd9f4e6fe57f521ca37d909d7937bde42 Mon Sep 17 00:00:00 2001 From: tligui_y Date: Sat, 9 Aug 2025 01:10:00 +0200 Subject: [PATCH] Update slic/utils/hastyepics.py --- slic/utils/hastyepics.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/slic/utils/hastyepics.py b/slic/utils/hastyepics.py index fbfa707d2..1945bc81a 100644 --- a/slic/utils/hastyepics.py +++ b/slic/utils/hastyepics.py @@ -20,15 +20,23 @@ class Motor(epics.Motor): raise MotorException("must supply motor name") if name.endswith('.VAL'): + print("Before :", name, "\n") name = name[:-4] + print("After :", name, "\n") if name.endswith('.'): + print("Before :", name, "\n") name = name[:-1] + print("After :", name, "\n") + self._prefix = name + print("LATER:", getattr(self, '_prefix'), "\n") + print("Prefix :", name, "\n") Device.__init__(self, name, delim='.', attrs=self._init_list, timeout=timeout) - + print("LATER:", getattr(self, '_prefix'), "\n") + print("After device :", name, "\n") # speed up: do not get any data from PVs during construction # # make sure this is really a motor! # rectype = self.get('RTYP') @@ -38,8 +46,10 @@ class Motor(epics.Motor): for key, val in self._extras.items(): pvname = "%s%s" % (name, val) self.add_pv(pvname, attr=key) - + print("After add_pv:", name, "\n") self._callbacks = {} + print("LATER:", getattr(self, '_prefix'), "\n") + print("End :", name, "\n") # speed up: used by Motor.get_pv() with connect=True, i.e., waiting for connection