Skip to content

Conversation

@willgames-afk
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants