WATCHDOG!!

Is it safe to set the watchdog expiration to 2 minuites and 15 seconds??

If that’s the case you might as well just disable it.

I did, but set turned on because when ever our robot kicks, and I recharge it while driving, it will go out of control untill the robot is fully charge, so if we were going forward the robot will keep going forward untill the kicker is fully recharged. so I am wondering if it has to do with the fact that the watchdog is disabled

It sounds like the code that recharges your kicker is “blocking” - that is, it takes control and doesn’t let other code execute while it is busy. You need to rewrite your kicker recharger so that it doesn’t do this.

I’m guessing that when you first wrote the recharger, the watchdog would immediately trip and shutdown the robot… so you disabled it. Now you have unsafe robot!

Whenever you disable the watchdog because it finds an error, you are just giving yourself an extra problem and making the original error worse. I have yet to see an error where disabling the watchdog was the correct decision.

We basically disabled it because during build season, when we leave the robot on for a while it would show that the watchdog is not being fed. At that time we did not have this problem

I’m guessing that you’re trying to use a loop of some sort in your recharge code.

Loops are not necessary 99% of the time in coding FIRST robots - after all the code already loops at between 20hz and 50hz.

Loops monopolize the processor and will not allow it to move on and “feed the watchdog”, unless of course your feed statement is inside the loop.

Did you understand what Eric was explaining about the recharge code blocking execution? If not, it’s worth talking it through until you understand it, and the proper way to design code so that it does not do this. The people here will help you. Ask questions.

**

Hence forth to be known and the VanWyk Axiom