Quote:
|
Originally Posted by maxlobovsky
My team's code is pretty simple this year so we just slapped our series of if statements for autonomous and a couple of independent if statements for user_routines inside the normal functions without changing much, but i was curious how many other coders actually did things nice and proper and wrote functions and such. If so, where do you put them and what have you found the most convenient?
|
I did what made logical sense to me. Any similar robot functions were grouped together into an actual code function.
I believe I had one for drive motors, one for an arm motor, one for all of our solenoids, and one for our compressor. And then some more random small ones that I don't even remember what they did.
Functions keep things cleaner, and if you have the time to set it up, use it.