|
Re: Delay
You can setup one of the timers and increment an integer in the interrupt routine (more accurate and adjustable period) or increment a counter variable in the default functions (fixed period but easier to implement and only works when OI is talking to the robot). Spinning a loop to get a delay is a bad idea in this application. The "paperwork" referred to in this post is the processing of messages to and from the operator interface controller. If you start missing those messages or not replying in a timely manner, the master game controller will disable your robot for the duration of the match.
Update: A simple spin to create usec type delays is OK but don't spin for a long time relative to the cycle of the main loop (~23ms).
Last edited by wireties : 18-01-2008 at 15:14.
|