Skip to content
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

Merged
merged 2 commits into from
Sep 19, 2023
Merged

Conversation

sfoster1
Copy link
Member

Is it open? Is it closed? Only you can decide

testing

  • put on robot
  • route should say open when door is open
  • route should say closed when door is closed

Is it open? Is it closed? Only you can decide
@sfoster1 sfoster1 marked this pull request as ready for review September 18, 2023 21:57
@sfoster1 sfoster1 requested a review from a team as a code owner September 18, 2023 21:57
Copy link
Contributor

@SyntaxColoring SyntaxColoring left a 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.",
Copy link
Contributor

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()
Copy link
Contributor

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.

Suggested change
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()

Copy link
Contributor

@vegano1 vegano1 left a 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.

@sfoster1 sfoster1 merged commit 4ec3bb7 into chore_release-7.0.0 Sep 19, 2023
@sfoster1 sfoster1 deleted the add-door-route branch September 19, 2023 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants