override assertInPosition from base class
- trying to avoid spurious "Hexiposi not in position" messages
This commit is contained in:
@@ -114,6 +114,21 @@ class Hexiposi(DiscretePositionerBase):
|
||||
print "Timeout waiting Hexiposi busy"
|
||||
break
|
||||
self.update()
|
||||
|
||||
#Retrying after end of move -> once in a while move raises a not in position exception.
|
||||
def assertInPosition(self, pos):
|
||||
retries = 3
|
||||
for i in range(retries):
|
||||
try:
|
||||
super(Hexiposi, self).assertInPosition(pos)
|
||||
return
|
||||
except:
|
||||
if i <(retries-1):
|
||||
time.sleep(0.5)
|
||||
else:
|
||||
raise
|
||||
|
||||
|
||||
|
||||
def is_in_position(self, pos):
|
||||
return self.take() == pos
|
||||
|
||||
Reference in New Issue
Block a user