|
Re: Clutter from autonomous
I have considered command based, but I feel it's a bit too abstract for a teaching tool, even if it would produce cleaner code.
We do currently break our code down into classes (shooter, collector, pid control, etc), however my gripe is these constructs still live in myrobot.cpp
Our teleop is pretty simple, and an autonomous routine taken by itself isn't so bad, but the sheer volume of autonomous routines (5 at the moment, with 3 or 4 deprecated, and at least one more on the way) leads to a large amount of code if it lives in one file. Moving the routines into seperate files would require passing all objects in myRobot.cpp by reference, or creating a .h file.
|