FRC2706 / 2020-2706-Robot-Code

The Robot Code for the 2020 FIRST Robotics Competition INFINITE RECHARGE
Other
4 stars 2 forks source link

An assorted collection of various improvements and refactors #84

Closed nrgill28 closed 4 years ago

nrgill28 commented 4 years ago

I decided to go through the project and clean some stuff up. I'll make these PRs in portions so it's not an overwhelming 20-file review for people.

nrgill28 commented 4 years ago

The Xbox class was removed since it's a duplicate of a WPILib built-in. Also, the DriveBase singleton pattern matches the one you've linked (The only difference I see is the lack of the final modifier)

georgetzavelas commented 4 years ago

I see about the XBox class. The singleton pattern is different than the one I linked. It uses an inner static class not a static variable.

nrgill28 commented 4 years ago

Oh. I don't know how I missed that... I had updated the singleton pattern to be consistent with the rest of the subsystems in the code, should we switch to using this new one for all future singletons then?

georgetzavelas commented 4 years ago

I would prefer us to use the inner static class way as it is thread safe. The only caveat with this approach is that initialization is for a failure state.

nrgill28 commented 4 years ago

This has become a little too outdated to merge easily. I'll just close this for now as it's not necessary.