Thread: While loops
View Single Post
  #4   Spotlight this post!  
Unread 01-11-2006, 11:28
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: While loops

Something else to note:

The RC does some processing each loop that lets it know that it's still alive. If it doesn't get to that processing in a timely manner (i.e. if you're in a tight loop), the master processor in the RC generate a code error. If you're not familiar with this process, it's referred to as a watchdog timeout.

I would suggest reevaluating why you're using a while loop in your RC code. If you're looping over a small amount of data (like a lookup table) you should be fine, but if you're doing serious data processing in the loop you may want to find an alternate way to perform the same task. As Timothy mentioned, there's already a loop within the RC code. Can you leverage that?
Reply With Quote