From ff88246f9640449cd07d9f18079b8deced84f5fa Mon Sep 17 00:00:00 2001 From: bugobliterator Date: Tue, 19 Nov 2024 10:51:44 +1100 Subject: [PATCH] AP_Arming: prearm check to validate backend read rates against scheduler loop rate --- libraries/AP_Arming/AP_Arming.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/AP_Arming/AP_Arming.cpp b/libraries/AP_Arming/AP_Arming.cpp index 4b058abe53605e..b349589ec51e33 100644 --- a/libraries/AP_Arming/AP_Arming.cpp +++ b/libraries/AP_Arming/AP_Arming.cpp @@ -484,6 +484,12 @@ bool AP_Arming::ins_checks(bool report) } #endif + // check if IMU gyro updates are greater than or equal to Ardupilot Loop rate + char fail_msg[MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN+1]; + if (!ins.pre_arm_check_gyro_backend_rate_hz(fail_msg, ARRAY_SIZE(fail_msg))) { + check_failed(ARMING_CHECK_INS, report, "%s", fail_msg); + return false; + } } #if HAL_GYROFFT_ENABLED