View Single Post
  #6   Spotlight this post!  
Unread 13-03-2011, 16:41
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,071
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: 706 had the curse of all curses

Quote:
Originally Posted by DonRotolo View Post
Good practice for a 500 mSec "wait" is to look at the clock every so often and when it's advanced that 1/2 second, you stop waiting.
It sounds like what you are describing is this: something happens in TeleOp (for example) which necessitates waiting for 500ms before taking some action.

Instead of sitting there waiting for 500ms to elapse (which would indeed cause the rest of your TeleOp code to freeze... but not other threads at the same or higher priority), you proceed with the rest of the TeleOp code. Each pass through TeleOp you check to see if the 500ms has elapsed and, if so, you execute the code in question. Is that what you meant?

Quote:
But it certainly is possible to have the entire system come to a grinding halt to literally wait.
I can see where the thread that is waiting would come to a grinding halt, and possibly make it look like the entire system has stopped. But other threads at the same or higher priority should continue to execute.



Reply With Quote