Skip to content

Commit

Permalink
Merge pull request #1005 from lnls-sirius/fix-injctrl
Browse files Browse the repository at this point in the history
Fix bugs InjCtrl IOC
  • Loading branch information
anacso17 authored Aug 1, 2023
2 parents dc41d6c + 874dc07 commit be79806
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion siriuspy/siriuspy/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.79.0
2.79.1
8 changes: 4 additions & 4 deletions siriuspy/siriuspy/injctrl/csdev.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ def get_injctrl_propty_database():
'type': 'int', 'value': 864, 'unit': 'bucket index',
'lolim': _ct.MIN_BKT, 'hilim': _ct.MAX_BKT},
'BucketListStep-SP': {
'type': 'int', 'value': 15, 'unit': 'buckets',
'lolim': -_ct.MAX_BKT+1, 'hilim': _ct.MAX_BKT-1},
'type': 'int', 'value': 29, 'unit': 'buckets',
'lolim': -_ct.MAX_BKT, 'hilim': _ct.MAX_BKT},
'BucketListStep-RB': {
'type': 'int', 'value': 15, 'unit': 'buckets',
'lolim': -_ct.MAX_BKT+1, 'hilim': _ct.MAX_BKT-1},
'type': 'int', 'value': 29, 'unit': 'buckets',
'lolim': -_ct.MAX_BKT, 'hilim': _ct.MAX_BKT},
'IsInjecting-Mon': {
'type': 'enum', 'value': _ct.IdleInjecting.Idle,
'enums': _et.IDLEINJECTING, 'unit': 'Idle_Inj'},
Expand Down
7 changes: 5 additions & 2 deletions siriuspy/siriuspy/injctrl/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def set_mode(self, value):

if self._pumode != _Const.PUMode.Accumulation:
self._update_log('ERR:Set PUMode to Accumulation before')
self._update_log('ERR:changing mode to {stg}')
self._update_log(f'ERR:changing mode to {stg:s}')
return False

self._update_log('Configuring EVG RepeatBucketList...')
Expand Down Expand Up @@ -650,7 +650,10 @@ def set_bucketlist_stop(self, stop):

def set_bucketlist_step(self, step):
"""Set bucketlist_step."""
if not -_Const.MAX_BKT+1 <= step <= _Const.MAX_BKT-1:
if not -_Const.MAX_BKT <= step <= _Const.MAX_BKT:
return False
if step == 0:
self._update_log('ERR:Bucket list step must not be zero.')
return False
if self._mode != _Const.InjMode.Decay:
if not self._update_bucket_list(step=step):
Expand Down

0 comments on commit be79806

Please sign in to comment.