Commit 3751f14a authored by Claudio Scafuri's avatar Claudio Scafuri 💬
Browse files

#15511: remove restrictions orn reading attribute Leak

parent 59105283
......@@ -103,7 +103,7 @@ class WaterSensor (PyTango.LatestDeviceImpl):
self.board_ok=[]
for i in range(self.NumBoards):
self.board_ok.append(False)
self.leak_ok = False #at least one borad must be ok to detect a leak
self.leak_ok = False #at least one board must be ok to detect a leak
self.attr_numero_schede_read = self.NumBoards
self.thread_data_acquisition = DataAcqusitionThread.DataAcquisitionThread(self)
self.thread_data_acquisition.setDaemon(True)
......@@ -124,11 +124,12 @@ class WaterSensor (PyTango.LatestDeviceImpl):
def read_leak(self, attr):
self.debug_stream("In read_leak()")
#----- PROTECTED REGION ID(WaterSensor.leak_read) ENABLED START -----#
if self._state == PyTango.DevState.UNKNOWN or not self.leak_ok:
attr.set_quality(PyTango.AttrQuality.ATTR_INVALID, True)
else:
attr.set_quality(PyTango.AttrQuality.ATTR_VALID, True)
attr.set_value(self.attr_leak_read)
# self.info_stream("leak_ok %d state %d",self._state,self.leak_ok)
# if self._state == PyTango.DevState.UNKNOWN or not self.leak_ok:
# attr.set_quality(PyTango.AttrQuality.ATTR_INVALID, True)
# else:
# attr.set_quality(PyTango.AttrQuality.ATTR_VALID, True)
attr.set_value(self.attr_leak_read)
#----- PROTECTED REGION END -----# // WaterSensor.leak_read
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment