|
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).
|