Skip to content

Conversation

@BioCam
Copy link
Collaborator

@BioCam BioCam commented Sep 11, 2025

No description provided.

@rickwierenga
Copy link
Member

Why not make PARKED_RIGHT part of the enum?

@BioCam
Copy link
Collaborator Author

BioCam commented Sep 11, 2025

Why not make PARKED_RIGHT part of the enum?

Can do but if it is part of the enum one would expect it to work the same way as the other enums... but that is not the case - when used with rotate for example it would break the method?

@rickwierenga
Copy link
Member

We can raise an error in that case

auto_id=False,
wp=orientation.value,
)
if orientation.value:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why base this on the enum value? It is very implicit. Also the enum values typically don't matter. It would better to check

if orientation in {not, allow}:
  raise
...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enum values are the reason for the existence of the enums, I thought? The vallues are what the firmware requires as input as in the example you highlighted.

We can of course make it more explicit though

@rickwierenga rickwierenga merged commit 2fefadb into PyLabRobot:main Sep 12, 2025
6 checks passed
@BioCam BioCam deleted the Fxi-`request_iswap_rotation_drive_position_increments` branch September 23, 2025 12:31
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.

2 participants