View Single Post
  #8   Spotlight this post!  
Unread 16-03-2008, 22:43
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: Last minute autonomous programming!

Quote:
Originally Posted by sumadin View Post
I'd referain from making it a char. A char will overflow after 256 cycles. Running around 26.2hz, the main loop will make 256 cycles in around 9.8 seconds. After that, it will drop to zero and start rising again. I'd suggest you make it

Code:
static unsigned int counter;
26.2ms/packet is actually about 38.17Hz.

Also, I believe this variable would overflow in about 6.7 seconds. I suggest you blow the extra byte of memory and go for an unsigned integer just to cover everything, as this won't overflow until after a whole 28 minutes at the 26.2ms rate.

I suggest a switch statement to run your time based autonomous.

If you are going to Cleveland, i'd be happy to give you some 'pointers'.

-q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08

Last edited by Qbranch : 17-03-2008 at 10:34.