From 99f5e74a8e6e5fd208a16bb6bdd1fa7976711645 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 5 Apr 2024 13:26:53 +1100 Subject: [PATCH] AP_NavEKF: correct initialisation of ekf_imu_buffer this init() call can be called on an existing buffer, in which case we clear the object. Presumably since we've just zeroed all the elements its safe to say that we should mark the object as having never-been-filled --- libraries/AP_NavEKF/EKF_Buffer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_NavEKF/EKF_Buffer.cpp b/libraries/AP_NavEKF/EKF_Buffer.cpp index 928a8d655a..8474ccecf4 100644 --- a/libraries/AP_NavEKF/EKF_Buffer.cpp +++ b/libraries/AP_NavEKF/EKF_Buffer.cpp @@ -137,6 +137,7 @@ bool ekf_imu_buffer::init(uint32_t size) _size = size; _youngest = 0; _oldest = 0; + _filled = 0; return true; }