Skip to content

Commit e4c1fdd

Browse files
author
Laurent Claustre
committed
reset min/max to default if 0/0
1 parent 2c6cdff commit e4c1fdd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

plugins/Bpm.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,10 @@ def write_min_max(self, attr):
440440
data = attr.get_write_value()
441441
max = 2**(self.ImageType2Bpp[_control_ref().image().getImageType()])
442442
range = [0, max]
443+
#reset asked to default
444+
if data[0] == 0 and data[1] == 0:
445+
data[1] = max
446+
443447
if data[0] > data[1]:
444448
PyTango.Except.throw_exception('WrongData',\
445449
f'Wrong values min_max: {data}, max < min',
@@ -466,7 +470,7 @@ def write_return_bpm_profiles(self,attr):
466470
data = attr.get_write_value()
467471
self.return_bpm_profiles = data
468472
#update the property
469-
prop = {'return_bpm_profiles': data}
473+
prop = {'return_bpmpylon/PylonBase.h_profiles': data}
470474
PyTango.Database().put_device_property(self.get_name(), prop)
471475

472476
def is_return_bpm_profiles_allowed(self,mode) :

0 commit comments

Comments
 (0)