From 63d21d995aa5b2bc9899e019716957f7af6813dd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 20 Apr 2019 12:58:48 +1000 Subject: [PATCH] HAL_ChibiOS: setup watchdog_reset internal error --- libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp b/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp index 6949c013a3..734f778957 100644 --- a/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp +++ b/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp @@ -28,6 +28,7 @@ #include "hwdef/common/stm32_util.h" #include "hwdef/common/watchdog.h" #include +#include #include @@ -208,6 +209,10 @@ static void main_loop() stm32_watchdog_init(); } + if (hal.util->was_watchdog_reset()) { + AP::internalerror().error(AP_InternalError::error_t::watchdog_reset); + } + while (true) { g_callbacks->loop();