Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ValorController is an abstract class that has 2 implementations:
Each controller houses the logic required to drive either a falcon or a neo. This is useful as we forgot to call specific functions in different subsystems that are associated with those motors in the past.
For example, setting up voltage compensation will be set for every motor now by default if you use a ValorController implementation (you still have the option of turning it off though if you desire!)
Instead, all of the logic is the same for each motor but can be modified if need be. There are getters and setters for the important functions for the motors.
Another thing to note is that since ValorController is an abstract class, the implementations share the exact same function calls. Using either class, you won't have to worry about which motor is under the hood since the calls all look the same.
Most importantly, this synchronizes the units of the motors. The falcon and neo both use different units at the base level. This ValorController class now makes sure that to Valor students, both have the same units. Conversion factors can be used to change them (if degrees are needed instead of inches or meters)