From cd3881823b5a5f06e89f8da2c96a3fe98e70e7c0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 21 Apr 2019 13:08:29 +1000 Subject: [PATCH] AP_HAL: added save/restore of attitude in 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 6d81da1849..05e9cfa978 100644 --- a/libraries/AP_HAL/Util.h +++ b/libraries/AP_HAL/Util.h @@ -32,6 +32,12 @@ public: // 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; } + + // backup atttude for restore on watchdog reset + virtual void set_backup_attitude(int32_t roll_cd, int32_t pitch_cd, int32_t yaw_cd) const {} + + // get watchdog reset attitude + virtual bool get_backup_attitude(int32_t &roll_cd, int32_t &pitch_cd, int32_t &yaw_cd) const { return false; } virtual const char* get_custom_log_directory() const { return nullptr; } virtual const char* get_custom_terrain_directory() const { return nullptr; }