|
Re: Desperate for watchdog help
Hi 1195,
We had watchdog woes until I adopted a new strategy.
(BTW, you don't need a robotMain() with SimpleRobot. In fact, don't include one unless you read the source for SimpleRobot and RobotBase.)
1. Feed the dog often, after every few lines--and after every line that does could pause (because it's a delay, or because it does i/o, or does a lot of math).
2. If you still have problems, comment out everything, then slowly comment lines back in until you find the one that makes the watchdog die. Tedious, but it works, and it teaches you a lot about the watchdog.
3. You can ease the pain of number 2 by increasing the watchdog time a bit.
Hats off to you for keeping the watchdog enabled! I know many teams just disable it, which isn't good practice.
|