|
Alright, here's what I know:
The OI passes data to the RC in a very continuous, predictable fashion: every 26 milliseconds, one data packet is sent to the robot.
Now, the robot's cycle is fully dependant on the code it's running through, so it may miss a cycle or two. Therefore, InnovationFIRST created a variable named delta_T that keeps track of how many packets you missed in the last cycle. Can you see where this is going?
If you keep track of delta_T, you can tell how many milliseconds have passed. Errors will add up though, as you get caught in the middle of cycles and so on... it's better than nothing though.
Someone correct me if I'm wrong.
__________________
Gui Cavalcanti
All-Purpose College Mentor with a Mechanical Specialty
Franklin W. Olin College of Engineering, Class of 2008
|