Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

feat: add object_size method to distance sensor #73

Merged

Conversation

Tropix126
Copy link
Member

Describe the changes this PR makes. Why should it be merged?

Adds a high-level binding to distance_get_object_size. This returns a unitless value that guesses the size of the scanned object.

Additional Context

Have not tested on V5 hardware. Don't have access to a distance sensor either. The binding is pretty straightforward, though.

Copy link
Member

@Gavin-Niederman Gavin-Niederman left a comment

Choose a reason for hiding this comment

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

Other distance sensor bindings work so this almost certainly does as well.

@Tropix126
Copy link
Member Author

Tropix126 commented Feb 1, 2024

I'm debating on whether or not this should be returned as a percentage or 0.0-1.0 since it's unitless and the 0-400 scale PROS uses is rather arbitrary (and comes from the SDK). Pretty sure its 0-400 because VEXCode parses it into an enum with 4 arbitrary "sizes".
image

Copy link
Member

@Gavin-Niederman Gavin-Niederman left a comment

Choose a reason for hiding this comment

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

LGTM

@Gavin-Niederman Gavin-Niederman merged commit 7a3744a into vexide:main Mar 19, 2024
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants