From bd84c0a8df9d5333ff3af1142033ffe995acda88 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 20 Apr 2019 19:49:11 +1000 Subject: [PATCH] AP_HAL: added save/restore of home to backup registers --- libraries/AP_HAL/Util.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/AP_HAL/Util.h b/libraries/AP_HAL/Util.h index 4108dc2ff0..038bf35efb 100644 --- a/libraries/AP_HAL/Util.h +++ b/libraries/AP_HAL/Util.h @@ -22,6 +22,12 @@ public: // return true if this is a watchdog reset boot and we were armed virtual bool was_watchdog_armed() const { return false; } + + // backup home state for restore on watchdog reset + virtual void set_backup_home_state(int32_t lat, int32_t lon, int32_t alt_cm) const {} + + // backup home state for restore on watchdog reset + virtual bool get_backup_home_state(int32_t &lat, int32_t &lon, int32_t &alt_cm) const { return false; } virtual const char* get_custom_log_directory() const { return nullptr; } virtual const char* get_custom_terrain_directory() const { return nullptr; }