|
Re: Feeding the Watchdog in "Periodic Tasks"
Redoing what the other mentor did is fine, but more important is to understand why it was done.
Watchdogs are there to verify that motors, pneumatics, and other potentially dangerous outputs are being controlled safely. Any place in the program where you are updating an output, you should consider what would happen if this code were to break. Also, how would you know if it broke and weren't running?
A tool for the second element is to have the loop update, or feed, the watchdog. Then set the update requirements of the watchdog to be related to the output rate. If the mentor fed the watchdog within the periodic task loop running at 100ms, it is probably because the loop does pneumatics or other outputs.
Does that make sense?
Greg McKaskle
|