14 lines
457 B
Python
14 lines
457 B
Python
def neutralize_position(retries = 3):
|
|
for i in range(retries):
|
|
try:
|
|
if abs(manip_x.readback.read()) > 50:
|
|
manip_x.write(0.0)
|
|
if abs(manip_y.readback.read()) > 50:
|
|
manip_y.write(0.0)
|
|
|
|
time.sleep(1)
|
|
break
|
|
except:
|
|
if i>=(retries-1):
|
|
raise
|
|
log("neutralize_position error - retrying: " + sys.exc_info()[1]) |