diff --git a/src/Smaract_mcs2.py b/src/Smaract_mcs2.py index 82eabab523b99c8e1286bc6e78c9e6b8eb82ea01..3c8022ddb3481396d776825af9c9e532282eff8a 100755 --- a/src/Smaract_mcs2.py +++ b/src/Smaract_mcs2.py @@ -26,7 +26,7 @@ ## along with Tango. If not, see <http://www.gnu.org/licenses/>. ## ## -## $Author : sci.comp@elettra.eu +## $Author : SPE - www.elettra.eu ## ## $Revision : $ ## @@ -546,7 +546,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl): self.move_steps(data - self.attr_Position_read) def is_Position_allowed(self, req_type): - return self.get_state() in (PyTango.DevState.ON,PyTango.DevState.MOVING,) + return self.get_state() in (PyTango.DevState.ON, PyTango.DevState.MOVING,) def read_Acceleration(self, attr): @@ -574,7 +574,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl): self.socket_write(cmd_str) def is_Acceleration_allowed(self, req_type): - return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() in (PyTango.DevState.ON, ) and self.sensor_present) + return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() not in (PyTango.DevState.MOVING, ) and self.sensor_present) def read_Velocity(self, attr): # self.debug_stream("In read_Velocity()") @@ -600,7 +600,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl): self.socket_write(cmd_str) def is_Velocity_allowed(self, req_type): - return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() in (PyTango.DevState.ON, ) and self.sensor_present) + return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() not in (PyTango.DevState.MOVING, ) and self.sensor_present) def read_HoldTime(self, attr): # self.debug_stream("In read_HoldTime()") @@ -678,7 +678,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl): self.socket_write(cmd_str) def is_LSOffset_allowed(self, req_type): - return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() in (PyTango.DevState.ON, ) and self.sensor_present) + return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() not in (PyTango.DevState.MOVING, ) and self.sensor_present) def read_HighLimitPosition(self, attr): # self.debug_stream("In read_HighLimitPosition()") @@ -702,7 +702,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl): self.socket_write(cmd_str) def is_HighLimitPosition_allowed(self, req_type): - return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() in (PyTango.DevState.ON, PyTango.DevState.ALARM,) and self.sensor_present) + return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() not in (PyTango.DevState.MOVING, ) and self.sensor_present) def read_LowLimitPosition(self, attr): # self.debug_stream("In read_LowLimitPosition()") @@ -726,7 +726,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl): self.socket_write(cmd_str) def is_LowLimitPosition_allowed(self, req_type): - return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() in (PyTango.DevState.ON, PyTango.DevState.ALARM,) and self.sensor_present) + return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() not in (PyTango.DevState.MOVING, ) and self.sensor_present) def read_Amplitude(self, attr): # self.debug_stream("In read_Amplitude()")