From fed89a0b1680bd06453feeaac5f08cf14ecde327 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 11 Apr 2019 20:01:05 +1000 Subject: [PATCH] HAL_ChibiOS: added commented out test code for watchdog --- libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp b/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp index 87996b2e5d..0dd0eaff89 100644 --- a/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp +++ b/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp @@ -212,6 +212,16 @@ static THD_FUNCTION(main_loop,arg) if (using_watchdog) { stm32_watchdog_pat(); } + +#if 0 + // simple method to test watchdog functionality + static bool done_pause; + if (!done_pause && AP_HAL::millis() > 20000) { + done_pause = true; + while (AP_HAL::millis() < 22000) ; + } +#endif + } thread_running = false; }