Skip to content

Commit

Permalink
Merge pull request #1135 from lnls-sirius/fix-idff
Browse files Browse the repository at this point in the history
Fix IDFF device use in IDFF IOC class
  • Loading branch information
xresende authored Jan 9, 2025
2 parents 4109f34 + bbf656d commit bdf5baa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions siriuspy/siriuspy/devices/idff.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,10 @@ class IDFF(_DeviceSet):
class DEVICES(_ID.DEVICES):
"""."""

def __init__(self, devname):
def __init__(self, devname, with_devctrl=True):
"""."""
devname = _SiriusPVName(devname)
self._with_devctrl = with_devctrl

# check if device exists
if devname not in IDFF.DEVICES.ALL:
Expand All @@ -273,7 +274,11 @@ def __init__(self, devname):
(self._devctrl, self._devid, self._devsch, self._devscv,
self._devsqs, self._devslc) = self._create_devices(devname)

devices = [self._devctrl, self._devid, ]
devices = list()
if self._with_devctrl:
devices += [self._devctrl, self._devid]
else:
devices += [self._devid, ]
devices += self._devsch
devices += self._devscv
devices += self._devsqs
Expand Down Expand Up @@ -547,7 +552,7 @@ def rampup_corr_currents(
_time.sleep(time_interval / (nrpts - 1))

def _create_devices(self, devname):
devctrl = IDFFCtrl(devname=devname)
devctrl = IDFFCtrl(devname=devname) if self._with_devctrl else None
pol_mon = _ID.get_idclass(devname).PARAM_PVS.POL_MON
params = (
self._pparametername, self._kparametername, pol_mon)
Expand Down
2 changes: 1 addition & 1 deletion siriuspy/siriuspy/idff/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, idname):
self.read_autosave_file()

# IDFF object with IDFF config
self._idff = _IDFF(idname)
self._idff = _IDFF(idname, with_devctrl=False)

# load idff in configdb
self._load_config(self._config_name)
Expand Down

0 comments on commit bdf5baa

Please sign in to comment.