![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
added main and defined M_PI
Diff: Watchdog/Watchdog.cpp
- Revision:
- 10:14374b492f1d
- Parent:
- 8:729ad465d6c9
--- a/Watchdog/Watchdog.cpp Wed Aug 07 17:26:41 2019 +0000 +++ b/Watchdog/Watchdog.cpp Wed Aug 07 18:50:14 2019 +0000 @@ -28,9 +28,10 @@ #include "mbed.h" #include "Watchdog.h" #include "BNO080.h" +#include <BNO080Wheelchair.h> /// Watchdog gets instantiated at the module level -Watchdog::Watchdog(BNO080 *imu) +Watchdog::Watchdog(BNO080Wheelchair *imu) { #ifdef LPC wdreset = (LPC_WDT->WDMOD >> 2) & 1; // capture the cause of the previous reset @@ -84,7 +85,7 @@ } else if ((timeout * (LsiFreq/32)) < 0xFF0) { PrescalerCode = IWDG_PRESCALER_32; Prescaler = 32; - if(imu1->begin()) { + if(imu1->setup()) { IWDG->KR = 0xAAAA; //Reload IWDG IWDG->KR = 0xCCCC; //Start IWDG Service();