Decrease code fragmentation, make constants follow naming convention #3
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.
This PR factors out most of the code in Constants.kt into other files.
But why?
Many of the constants defined in Constants.kt were only use one time, in another file. It didn't make a lot of sense to me to separate it into a constants file at that point. Like, we had a mini version of each of the subsystems in the constants file- why not just put those constants into that subsystem?
Having them in separate files means that there are now 2 places you have to change whenever you update a file, making the rapid iteration present in FRC result in very messy code, and slowing down the process. I personally find it very helpful to see where my values are being used, and storing them all in a separate file means that I don't have that context.
I decided to keep constants.kt around, but change its purpose from storing all the constants of the program to storing constants related to safety (ie current limits, max speeds, etc)
I'd like your feedback on this- did I go too far? Should we keep CAN constants in one place for fast access? Please collaborate with me on this!