Quote:
Originally Posted by ekapalka
Is there a benefit to using IterativeRobot instead of SimpleRobot? I'm just wondering. We've been writing all of our simple programs using SimpleRobot to demonstrate the various functions of the robot. Thanks for this, by the way! Our primary problem was a bad PWM cable. We'll be testing to see if we can get the new sensor working today.
|
IterativeRobot is beneficial because it splits up the periodic and continuous functions for you, provides an init function, and discourages putting blocking while loops in your Autonomous/Teleop handlers.
It makes it easier to add all of your code to the periodic functions, and if you need to add some time sensitive code, it can be added into continuous without restructuring your code.
By removing while loops (or hiding them in the base class), it helps prevent getting stuck in auton mode and never getting to teleop, and in general it encourages writing non-blocking code.