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

Add more newtypes #9

Open
auscompgeek opened this issue Feb 23, 2019 · 0 comments
Open

Add more newtypes #9

auscompgeek opened this issue Feb 23, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@auscompgeek
Copy link
Member

I'm not happy with the existing motor controller set API here. Here is what I would envision a better set API would look like:

  • There is some sort of Setpoint or similar enum which corresponds to each control mode. It should be possible to add them and multiply them by scalars.
  • The get position/velocity methods also return a newtype.
  • Multiplying a velocity with a std::time::Duration will give an appropriate position.
  • Each DemandType would get a newtype enum as well, to remove the redundant demand1 argument for DemandType::Neutral.
@auscompgeek auscompgeek added the enhancement New feature or request label Feb 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant