Quote:
Originally Posted by 1452-Leo
How would this be different than the code I started with? Iterative basically just adds a function to be called at the beginning, but doesn't really change what is actually going on in the program.
|
Iterative waits for each driver station packet for each iteration, whereas your original code runs in a tight loop without waiting for input. If you added a 20ms sleep in your loop, it would be vaguely equivalent to the iterative version.
Either way, you should add some sleep to your loop, otherwise you'll starve the rest of the threads on your system and you'll encounter problems. I'd recommend using iterative robot instead though, then you don't have to worry about things like that.