Skip to content

Commit

Permalink
Merge pull request #973 from slaclab/ESROGUE-641
Browse files Browse the repository at this point in the history
Add warning when loading a configuration and variable mode is not enabled
  • Loading branch information
slacrherbst authored Sep 21, 2023
2 parents fecc893 + d782772 commit d1c903f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/pyrogue/_DataReceiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def __init__(self,
self.add(pr.LocalVariable(name='Data',
typeStr=typeStr,
disp='',
groups=['NoState','NoStream'],
value=value,
hidden=hideData,
description='Data Frame Container'))
Expand Down
4 changes: 4 additions & 0 deletions python/pyrogue/_Variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,10 +814,14 @@ def _setDict(self,d,writeEach,modes,incGroups,excGroups,keys):

for val,i in zip(s,idxSlice):
self.setDisp(val.strip(), write=writeEach, index=i)
else:
self._log.warning(f"Skipping set for Entry {self.name} with mode {self._mode}. Enabled Modes={modes}.")

# Standard set
elif self._mode in modes:
self.setDisp(d,writeEach)
else:
self._log.warning(f"Skipping set for Entry {self.name} with mode {self._mode}. Enabled Modes={modes}.")

def _getDict(self, modes=['RW', 'RO', 'WO'], incGroups=None, excGroups=None, properties=False):
"""
Expand Down

0 comments on commit d1c903f

Please sign in to comment.