Thread: Timer Question
View Single Post
  #2   Spotlight this post!  
Unread 28-03-2007, 22:40
yoyodyne yoyodyne is offline
Registered User
AKA: Greg Smith
FRC #0116 (Epsilon Delta)
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Reston, VA
Posts: 61
yoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to behold
Re: Timer Question

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