This commit is contained in:
@@ -55,7 +55,8 @@ def mount(segment, puck, sample, force=False, read_dm=False, auto_unmount=False)
|
||||
smart_magnet.set_supress(False)
|
||||
time.sleep(0.2)
|
||||
#To better dectect sample
|
||||
smart_magnet.apply_resting()
|
||||
smart_magnet.apply_resting()
|
||||
time.sleep(0.5)
|
||||
if smart_magnet.check_mounted(idle_time=0.25, timeout = 1.0) == True:
|
||||
if auto_unmount and (get_setting("mounted_sample_position") is not None):
|
||||
#auto_unmount set to true so detection remains enabled
|
||||
|
||||
@@ -118,7 +118,7 @@ def move_to_safest_point(segment, vicinity_tolerance = 100):
|
||||
#print "Recovered to point " + str(robot.get_curjoint_or_pointrent_point())
|
||||
|
||||
|
||||
def recover():
|
||||
def recover(move_park = True):
|
||||
#Initial checks
|
||||
robot.assert_no_task()
|
||||
robot.reset_motion()
|
||||
@@ -144,7 +144,12 @@ def recover():
|
||||
location = robot.get_current_point()
|
||||
if location is None:
|
||||
raise Exception("Robot didn't reach known point")
|
||||
return "Success recovering to point: " + str(location)
|
||||
print "Success recovered to point: " + str(location)
|
||||
if move_park:
|
||||
robot.move_park()
|
||||
return "Success recovered to park position"
|
||||
else:
|
||||
return "Success recovered to point: " + str(location)
|
||||
#finally:
|
||||
# robot.set_default_speed()
|
||||
if not is_on_known_segment:
|
||||
|
||||
Reference in New Issue
Block a user