I would consider myself an advanced programmer in comparison to others, and I have already spent hundreds of hours working on a command based program for my team. The program that I used implements Multithreading, Synchronization, notifications between threads, UDP (RPi to Roborio), etc… I’d like to say that I took the code to the next level, and I have already completed designing this year’s code in a command based fashion. (Currently the code is in java, however, it could also be in C++.)
The problem is that I’m starting to see some limitations to the command based program that they give you when you take the code to the next level…
When creating an FRC Robot Project it gives you the option to choose Command based (what I’ve chosen so far), Iterative, or Sample. For Sample, it says: “… for highly advanced programs with more complete control over program flow” so a few days ago I tried to create a project using Sample and see what I find. I have already built an interface with a java.util.Timer which calls an update method every 20ms and an enum which represents the current mode of the robot, haven’t done too much yet.
I’m not sure if I should move the code over to using Sample where I build the whole structure for the robot code instead of using the WPILib command based system libraries… My level of programming would not be a problem in my opinion for designing a structure similar in complexity to the command based programming.
My question is:
What are the advantages that you know of for giving my program “complete control over program flow” and would you recommend it?