View Single Post
  #25   Spotlight this post!  
Unread 12-04-2006, 01:06
P1h3r1e3d13's Avatar
P1h3r1e3d13 P1h3r1e3d13 is offline
Unregistered User
FRC #0295
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: San Diego/Granite Bay
Posts: 46
P1h3r1e3d13 is an unknown quantity at this point
Re: EasyC autonomous modes

I believe that all your creative solutions using !IsEnabled() are actually moot.

Input from the competition port overrides code loops. In other words, even if you have a while(1) in your autonomous code, when your dongle (or whoever's running the match) switches off autonomous, your code drops whatever it's doing, and the Operator Control code starts.

Our code has a while(1) in Autonomous() and it works fine. I can't remember if I've tried it in Initialize(), but I have every reason to think it should work the same. Still, test it with a dongle, just to be triple sure.


On the other hand, the simple way (the way I used) is to have a switch (or several, or an analog input as described above), set it before you power on the bot, and just read it once (no loops).