From 92f12deb5161d60fae7464115c4f885baa4d1ec9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 20 Apr 2019 10:24:06 +1000 Subject: [PATCH] AP_HAL: added was_watchdog_safety_off() used to restore safety state on watchdog reset --- libraries/AP_HAL/Util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/AP_HAL/Util.h b/libraries/AP_HAL/Util.h index bb51856638..cbcb4d9768 100644 --- a/libraries/AP_HAL/Util.h +++ b/libraries/AP_HAL/Util.h @@ -21,6 +21,9 @@ public: // return true if the reason for the reboot was a watchdog reset virtual bool was_watchdog_reset() const { return false; } + // return true if safety was off and this was a watchdog reset + virtual bool was_watchdog_safety_off() const { return false; } + virtual const char* get_custom_log_directory() const { return nullptr; } virtual const char* get_custom_terrain_directory() const { return nullptr; } virtual const char *get_custom_storage_directory() const { return nullptr; }