From a77e5caeb97bfd8e32363a3ab40d1c0e741b2da2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 2 Oct 2020 09:42:49 +1000 Subject: [PATCH] AP_InternalError: added an internal error for GPIO ISR overload --- libraries/AP_InternalError/AP_InternalError.cpp | 2 ++ libraries/AP_InternalError/AP_InternalError.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/AP_InternalError/AP_InternalError.cpp b/libraries/AP_InternalError/AP_InternalError.cpp index 28d11f248c..56542ea8a9 100644 --- a/libraries/AP_InternalError/AP_InternalError.cpp +++ b/libraries/AP_InternalError/AP_InternalError.cpp @@ -54,6 +54,8 @@ void AP_InternalError::errors_as_string(uint8_t *buffer, const uint16_t len) con "sfs_recursion", // switch_full_sector_recursion "bad_rotation", "stack_ovrflw", // stack_overflow + "imu_reset", // imu_reset + "gpio_isr", }; 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 42743f3d9b..a20c0e0736 100644 --- a/libraries/AP_InternalError/AP_InternalError.h +++ b/libraries/AP_InternalError/AP_InternalError.h @@ -61,7 +61,9 @@ public: switch_full_sector_recursion= (1U << 21), //0x200000 2097152 bad_rotation = (1U << 22), //0x400000 4194304 stack_overflow = (1U << 23), //0x800000 8388608 - __LAST__ = (1U << 24), // used only for sanity check + imu_reset = (1U << 24), //0x1000000 16777216 + gpio_isr = (1U << 25), //0x2000000 33554432 + __LAST__ = (1U << 26), // used only for sanity check }; // if you've changed __LAST__ to be 32, then you will want to