Thread: Watchdog!?!?!?!
View Single Post
  #22   Spotlight this post!  
Unread 02-03-2009, 09:12
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,532
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Watchdog!?!?!?!

To try to clarify this (and get rid of the cute "feed" term):

Feeding the watchdog is nothing more than letting the watchdog code run once in a while. This tells the system that the robot is still "under control".

A VERY easy way to not allow the watchdog code to run is to put your camera code in the same loop as the drive code. The camera code is processor hungry and will run as often as it can - and not allow the watchdog to run.

As other people have said - infinite loops, looping with no wait statement, and a couple other items can cause the watchdog to kick off. We struggled with it earlier when we put our camera code in our drive code as an experiment. It was a good learning experience!
Reply With Quote