|
Re: Feeding the Watchdog
The example basicxman gave is correct. If it isn't working for you you should look carefully at your code for these things:
any init (such as the camera mentioned) that might take longer than the expiration
are you feeding it within all loops that might run longer than the expiration
do you ever pend on input that may not come fast enough
Timer.delay calls that may total too much time
Examine every loop or method call to make sure. Put printlns in that display the time in potential problem areas, some things, like processing large images take a lot longer than you might think. Lots of printlns are expensive. DriverStationLCD prints take a while. etc.
If you post your code we could look for potential problem areas
Good luck!
|