Quote:
Originally Posted by Mark McLeod
Personally, I wouldn't put Watchdog handling in a Periodic task unless you really understand everywhere the Watchdog is being used and why.
Periodic tasks do not typically require a Watchdog at all.
The main error I see is that using the Watchdog in a Periodic Task generally invalidates all other uses of the Watchdog in the parallel Auto or Teleop tasks.
Parallel Watchdogs just tend to preempt each other.
Generally, you want the Watchdog to be handled in a single critical path.
|
I agree with Mark on this one.
If you are concerned about the safety of a periodic task, then monitor its health from a task (like TeleOP or Auto) which
is protected by watchdog.
For example, increment a global variable in the periodic task, and test the variable in TeleOP (or Auto). If the variable stops incrementing or is not incrementing at the expected rate, then trip the watchdog within TeleOp (or Auto).
~