|
Re: Watchdog!?!?!?!
We had a watchdog issue when our battery got too low.
In C++, the default code has something like
GetWatchDog().Feed()
at the top of the OperatorControl() loop. You need to make sure that that function gets called frequently.
In C++ (and probably all the other languages, since they are all the same library), the image analysis code seems to be a bit too slow to keep your watchdog fed if you put it in your main loop. I recommend you create a new task (aka thread) and do the image analysis there, putting the results in some variable accessible to the main OperatorControl() or Autonomous() loops.
That's what we're going to be doing today. I don't know the specifics of how we're going to do it yet, but I do know that the PIDController class spawns a new thread in its constructor, so we're going to be copying that.
|