Quote:
Originally Posted by dgbatths
Since the packet from the PC or FMS indicates whether it is autonomous or tele-op mode, do you really need two programs? Wouldn't it be simpler to have one program and eliminate the need to use the program chooser?
|
It's possible to write a program this way but you'll find that you then have just enough flexibility to allow you to unintentionally mess up your match. For example, if you write your autonomous code to do something that takes longer than the autonomous period lasts, you might not be able to control your robot when teleop starts. By splitting it into two programs, the field management system can unconditionally stop your autonomous code, even if it's gone astray.