Tell: fix event names for mounting and added missing events for gripper detection and motion sync. WIP
This commit is contained in:
1 parent
425ab40b21
commit
ace06a21ea
1 file changed
+12
-4
@@ -258,21 +258,29 @@ class TellClient:
|
||||
wait_timeout = timeout + self.estimate_mounting_time(segment)
|
||||
logger.info("waiting for mount to complete")
|
||||
if wait and segment in "ABCDEF":
|
||||
event, value = self.pshell.wait_events({"state": None, "motion_task": "dry", "gripper_detection" : "No Pin in Gripper", "motion_sync": "Robot Clear after mount"}, timeout=wait_timeout)
|
||||
event, value = self.pshell.wait_events({"state": None, "Motion Task": "dry",
|
||||
"Gripper detection" : None,
|
||||
"Motion Sync": "Robot Clear after mount"}, timeout=wait_timeout)
|
||||
if event is None or event == "state":
|
||||
logger.info(f"event: {event} occurred with value: {value}, checking command completed okay")
|
||||
self.check_command_ok(
|
||||
timeout=wait_timeout, msg=f"Mount {segment}{puck}-{sample}: "
|
||||
)
|
||||
return value
|
||||
elif event == "gripper_detection":
|
||||
elif event == "Gripper detection" and value == "No Pin in Gripper":
|
||||
logger.info(f"gripper detection: {event} occurred with value: {value}")
|
||||
return value
|
||||
elif event == "motion_task" and value == "dry":
|
||||
elif event == "Gripper detection" and value == "Pin still in Gripper":
|
||||
logger.info(f"gripper detection: {event} occurred with value: {value}")
|
||||
return value
|
||||
elif event == "Gripper detection" and value == "Pin is lost":
|
||||
logger.info(f"gripper detection: {event} occurred with value: {value}")
|
||||
return value
|
||||
elif event == "Motion Task" and value == "dry":
|
||||
logger.info(f"event: {event} occurred with value: {value}")
|
||||
logger.info(" Drying occurring, releasing interface to user")
|
||||
return value
|
||||
elif event == "motion_sync" and value == "Robot Clear after mount":
|
||||
elif event == "Motion Sync" and value == "Robot Clear after mount":
|
||||
logger.info(f"event: {event} occurred with value: {value}")
|
||||
logger.info(" Mounting complete, releasing interface to user")
|
||||
return value
|
||||
|
||||
Reference in new issue
Block a user