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

✨[FEATURE REQUEST] Get velocity for adi::Encoder #622

Open
Tropix126 opened this issue Jan 9, 2024 · 1 comment
Open

✨[FEATURE REQUEST] Get velocity for adi::Encoder #622

Tropix126 opened this issue Jan 9, 2024 · 1 comment
Labels
enhancement This builds on top of an existing feature

Comments

@Tropix126
Copy link

Tropix126 commented Jan 9, 2024

Is your feature request related to a problem? Please describe.
Three wire Encoders seem to natively support reporting velocity data through the SDK, as is evident from vex::encoder::velocity. The relevant libv5rt function seems to be vexAbsEncVelocityGet. It'd be nice if PROS supported this device functionality, since the data is available but never used or reported.

What is the behavior that isn't addressed by the existing API?
There's currently no way to get the velocity of a three-wire encoder without manually differentiating the position value through a custom implementation.

OPTIONAL Describe any solutions you've considered
Create a adi::Encoder::get_velocity() method similar to v5::Motor::get_actual_velocity or v5::Rotation::get_velocity that returns the velocity value reported from the sensor

Additional context
None

@Tropix126 Tropix126 added the enhancement This builds on top of an existing feature label Jan 9, 2024
@WillXuCodes
Copy link
Member

vexAbsEncVelocityGet from what I remember is the Rotation sensor's velocity. This is something we'd have to discuss in terms of the most optimized way of doing it.

For a potential dev in the future working on this: Registry provides a scratch register that you can write values to and from, it's just not big by any means and has to be divided among all the ADI ports... do with that what you will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This builds on top of an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants