View Single Post
  #2   Spotlight this post!  
Unread 16-02-2010, 07:47
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Intra-Loop Timing Advice

Free running literally means take all available resources, pretty much maxing out the CPU. This won't necessarily do harm unless you have some lower priority tasks which may now become starved. It will also add lag to other tasks since at any given point in time, the CPU will have to finish the excess loops before it gets to the task that waited in line.

Moral: Almost always delay your loops in some way. The ideal way is to make them run when new data arrives or is needed. In some cases this is more easily done using a time schedule, but that has its own set of tradeoffs.

At this point, I wouldn't recommend it unless you have an issue. But when you have time, read up on the notification mechanisms, and especially the FIFO.

Greg McKaskle
Reply With Quote