View Single Post
  #6   Spotlight this post!  
Unread 15-01-2006, 00:30
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Loop time for OperatorControl function? Debug blows...

I'll look into that issue tomorrow. I'll let you know.
The values your robot prints to screen should be current as of the last
time the variables were updated in the program loop.

Example of Current Loop:
X = X - Y;
printf("PrintX: %d ",X);

Example Loop Behind:
printf("PrintX: %d ",X);
X = X - Y;

You do have to take into account the fact there is a 26ms delay between loops.

If the change is large and quick alot can happen in a loop. If you have a 200 line encoder and your wheel is spinning at 300RPM there will be jumps in the
numbers of ticks between loops.

Last edited by Kingofl337 : 15-01-2006 at 00:35.