From: Joseph Coffland Date: Mon, 14 Mar 2016 03:40:07 +0000 (-0700) Subject: Added watchdog X-Git-Url: https://git.buildbotics.com/?a=commitdiff_plain;h=4f74ca6fa8f6b53fc658940460d85e523e7a721c;p=bbctrl-firmware Added watchdog --- diff --git a/src/main.c b/src/main.c index 8ef03ee..05abdb6 100644 --- a/src/main.c +++ b/src/main.c @@ -40,6 +40,7 @@ #include #include +#include #include @@ -80,10 +81,15 @@ static void init() { int main() { + wdt_enable(WDTO_250MS); + init(); // main loop - while (1) controller_run(); // single pass through the controller + while (1) { + controller_run(); // single pass through the controller + wdt_reset(); + } return 0; }