Quote:
Originally Posted by yoyodyne
That would work except that I think your autonomous code will start running a little before the disabled_mode is turned off so it will time out faster as a result. You could add
if (disabled_mode)
timer = 0;
in your autonomous loop and then it will not actually start to increment until the autonomous period actually starts.
If you want you can use a more capable e timer capability. I posted the team 116 timer library which allows you to run up to 10 software elapsed timers and 10 event timers that actually will call a routine when they time out. If you are interested in that look toward the bottom of this thread.
http://www.chiefdelphi.com/forums/sh...dware+t imers
Good luck,
Greg
|
wow thats a lot. we'd definately consider it if we had the time

but we are VERY short on time, planning to program this on the spot so we have a moving robot in autonomous =D (even if it does nothing useful). so i think its best for us to stick with a simple timer code. By the way, u said there may be some problems with disabled mode? is the
if (disabled_mode)
timer = 0;
the actual code for it? as in, can we use this exact code and ensure the program will work? thanks