-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(robot-server): monitor door status #13584
Conversation
Is it open? Is it closed? Only you can decide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I tested this on an OT-2. This LGTM once the type-checking errors are resolved.
|
||
@control_router.get( | ||
"/robot/door/status", | ||
summary="Get the status of the robot door.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a more general term than "robot door" that we should use to account for the fact that on the OT-2, this is also wired to the top window?
I'm also fine with just going with "door," since that's what the advanced setting says.
) -> None: | ||
"""Test the door status route.""" | ||
decoy.when(hardware_api.door_status).then_return(state) | ||
assert (await get_door_status(hardware_api)).data.state == state.name.lower() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.data
-> .content.data
to resolve type-checking errors.
assert (await get_door_status(hardware_api)).data.state == state.name.lower() | |
assert ( | |
await get_door_status(hardware_api) | |
).content.data.state == state.name.lower() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, this will work.
I think it would be good eventually to have eStop, door_state, and any other "safety" states come from one endpoint to cut down on chatter.
Is it open? Is it closed? Only you can decide
testing