Log in

View Full Version : Watchdog Question


defcon4
14-02-2014, 11:46
Hi...I was wondering if someone could help me out with Watchdog. We are using Java for the first time and everything seems to be going well. I have seen sample code around the net using the code getWatchdog in the simple robot template. I have not seen it used in the iterative robot template and that is what our team is using. We are using a mecanum drive system and pneumatics for the rest of our system. My question is do I have to use Watchdog in the iterative robot template and if so where and how do I code it. Thank you

notmattlythgoe
14-02-2014, 11:47
Hi...I was wondering if someone could help me out with Watchdog. We are using Java for the first time and everything seems to be going well. I have seen sample code around the net using the code getWatchdog in the simple robot template. I have not seen it used in the iterative robot template and that is what our team is using. We are using a mecanum drive system and pneumatics for the rest of our system. My question is do I have to use Watchdog in the iterative robot template and if so where and how do I code it. Thank you

As far as I know, you don't have to worry about it.

otherguy
14-02-2014, 14:06
The IterativeRobot class takes care of feeding the watchdog for you. You don't need to mess with it if you don't want to.

http://team2168.org/javadoc/src-html/edu/wpi/first/wpilibj/IterativeRobot.html#line.145

My assumption is that SimpleRobot does something similar.

defcon4
14-02-2014, 15:07
Thank you that was very helpful.:)

Joe Ross
14-02-2014, 15:38
My assumption is that SimpleRobot does something similar.

The watchdog is disabled in RobotBase by default (both SimpleRobot and IterativeRobot extend RobotBase). SimpleRobot does not feed the watchdog in the background like IterativeRobot, because there is no background in SimpleRobot. If the user enables the watchdog in SimpleRobot, the user must also feed it.

defcon4
14-02-2014, 19:56
Awesome! Thanks!:)

Herbblood
25-02-2014, 08:14
Just don't mess with watchdog, we've had problems with watchdog before and perfer not to use it.