-
Notifications
You must be signed in to change notification settings - Fork 610
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
[wpimath] Cleanup and Enhancement of DCMotor and gearboxes #7435
base: main
Are you sure you want to change the base?
Conversation
/format |
Why? Factories seemed like a good approach to me |
Since they are constants enums seemed like a better choice for me as that's the primary purpose of an enum, to provide a simplified way of handling constants. Also once I separated out numMotors from DCMotor and integrated it into gearbox the static factory methods didn't seem necessary as they no longer had an input argument. Plus adding a new motor would be super simple. Just add it to the next row of enum Values |
So in an effort to clean up and enhance DCMotor and the whole concept of a gearbox I decided to do the following.
Summary of changes.
Java changes
C++ changes.
... coming soon. Currently in production.
As per usual any feedback is welcome and appreciated.