From 1d80b9c03b32bbe919c4e8d26cdbb59dd69b5e87 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Sat, 25 May 2024 09:31:12 +0100 Subject: [PATCH] AP_AHRS: correct get_accel() to use primary accel rather than first usable for scripting --- libraries/AP_AHRS/AP_AHRS.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_AHRS/AP_AHRS.h b/libraries/AP_AHRS/AP_AHRS.h index e6aa24064a0977..43951c34dbee3b 100644 --- a/libraries/AP_AHRS/AP_AHRS.h +++ b/libraries/AP_AHRS/AP_AHRS.h @@ -620,7 +620,7 @@ class AP_AHRS { // return primary accels, for lua const Vector3f &get_accel(void) const { - return AP::ins().get_accel(); + return AP::ins().get_accel(_get_primary_accel_index()); } // return primary accel bias. This should be subtracted from