From 87f5f8fba9b2766c4494fbc533510bce6c523502 Mon Sep 17 00:00:00 2001
From: Milan Prica <milan.prica@elettra.eu>
Date: Thu, 9 Sep 2021 08:37:32 +0200
Subject: [PATCH] Some attribute R/W permits modiified

---
 src/Smaract_mcs2.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/Smaract_mcs2.py b/src/Smaract_mcs2.py
index 1231ce9..e209541 100755
--- a/src/Smaract_mcs2.py
+++ b/src/Smaract_mcs2.py
@@ -580,7 +580,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() not in (PyTango.DevState.MOVING, ) and self.sensor_present)
+        return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() not in (PyTango.DevState.MOVING, PyTango.DevState.FAULT,) and self.sensor_present)
 
     def read_Velocity(self, attr):
         # self.debug_stream("In read_Velocity()")
@@ -606,7 +606,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() not in (PyTango.DevState.MOVING, ) and self.sensor_present)
+        return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() not in (PyTango.DevState.MOVING, PyTango.DevState.FAULT,) and self.sensor_present)
 
     def read_HoldTime(self, attr):
         # self.debug_stream("In read_HoldTime()")
@@ -684,7 +684,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() not in (PyTango.DevState.MOVING, ) and self.sensor_present) 
+        return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() not in (PyTango.DevState.MOVING, PyTango.DevState.FAULT,) and self.sensor_present) 
 
     def read_HighLimitPosition(self, attr):
         # self.debug_stream("In read_HighLimitPosition()")
@@ -708,7 +708,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() not in (PyTango.DevState.MOVING, ) and self.sensor_present)
+        return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() not in (PyTango.DevState.MOVING, PyTango.DevState.FAULT,) and self.sensor_present)
 
     def read_LowLimitPosition(self, attr):
         # self.debug_stream("In read_LowLimitPosition()")
@@ -732,7 +732,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() not in (PyTango.DevState.MOVING, ) and self.sensor_present)
+        return req_type is PyTango.AttReqType.READ_REQ or (self.get_state() not in (PyTango.DevState.MOVING, PyTango.DevState.FAULT,) and self.sensor_present)
 
     def read_Amplitude(self, attr):
         # self.debug_stream("In read_Amplitude()")
-- 
GitLab