View Single Post
  #5   Spotlight this post!  
Unread 20-01-2009, 09:54
j_johnson j_johnson is offline
Registered User
FRC #0226 (Hammerheads)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2003
Location: Shelby Township, MI
Posts: 10
j_johnson is an unknown quantity at this point
Re: Image processing and performance

If you are using a class inherited from IterativeRobot, note that there is no built in delay, so it will use as much processing power as possible, the kernel splitting it equally with tasks of the same priority. To correct this, you can add a taskDelay() call in each of the XXXContinuous functions.

The delay should be long enough to cede as much processing power to other threads as possible without being so long that you are missing calls to the XXXPeriodic functions. (Assuming you are not using the XXXContinuous for anything time sensitive.) Make sure to include taskLib.h which declares this method.

Here is some documentation on VxWorks tasks if you are interested in reading more.
Reply With Quote