Quote:
Originally Posted by Ginto8
Don't get me wrong, I love the idea. It just seems like you reinvented the wheel a little bit for this application of it.
|
Nah... that's how I'd have done it... offer it as a parameter and then delegate selection to some other function. The advantage to this is development diagnostics. If you need to test a ball and you only have one ball, you'd want a way to easily pick it. Actually we do something similar to that we just stub the function to a network variable, and we also have ball selection in a UI for offline threshold settings per ball color.
In regards to getAlliance(), it is cool though that people actually use that function call and verified that it works. There are several more cool methods like that in DriverStation.h for c++ it is the same name just different case GetAlliance().