From 9e15efcbb5fb3e7835d304b9cf010b366ed32725 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Jan 2021 10:10:42 +1100 Subject: [PATCH] AP_InertialSensor: added params restored internal error --- libraries/AP_InternalError/AP_InternalError.cpp | 2 ++ libraries/AP_InternalError/AP_InternalError.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/AP_InternalError/AP_InternalError.cpp b/libraries/AP_InternalError/AP_InternalError.cpp index b184d34ce3..1d08adaf64 100644 --- a/libraries/AP_InternalError/AP_InternalError.cpp +++ b/libraries/AP_InternalError/AP_InternalError.cpp @@ -13,6 +13,7 @@ void AP_InternalError::error(const AP_InternalError::error_t e, uint16_t line) { switch (e) { case AP_InternalError::error_t::watchdog_reset: case AP_InternalError::error_t::main_loop_stuck: + case AP_InternalError::error_t::params_restored: // don't panic on these to facilitate watchdog testing break; default: @@ -59,6 +60,7 @@ void AP_InternalError::errors_as_string(uint8_t *buffer, const uint16_t len) con "gpio_isr", "mem_guard", "dma_fail", + "params_restored", }; static_assert((1U<<(ARRAY_SIZE(error_bit_descriptions))) == uint32_t(AP_InternalError::error_t::__LAST__), "too few descriptions for bits"); diff --git a/libraries/AP_InternalError/AP_InternalError.h b/libraries/AP_InternalError/AP_InternalError.h index 0906ba1f1d..0c6ee9102c 100644 --- a/libraries/AP_InternalError/AP_InternalError.h +++ b/libraries/AP_InternalError/AP_InternalError.h @@ -65,7 +65,8 @@ public: gpio_isr = (1U << 25), //0x2000000 33554432 mem_guard = (1U << 26), //0x4000000 67108864 dma_fail = (1U << 27), //0x8000000 134217728 - __LAST__ = (1U << 28), // used only for sanity check + params_restored = (1U << 28), //0x10000000 268435456 + __LAST__ = (1U << 29), // used only for sanity check }; // if you've changed __LAST__ to be 32, then you will want to