From 52209d9d1acc16505100f98fe9909f085e8dcb5b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 Dec 2021 09:07:02 +1100 Subject: [PATCH] AP_NavEKF2: fixed gaps in EKF logging timestamps should not be static as otherwise some lanes will not be logged --- libraries/AP_NavEKF2/AP_NavEKF2_Logging.cpp | 1 - libraries/AP_NavEKF2/AP_NavEKF2_core.h | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_Logging.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_Logging.cpp index 76bc29cbfa..72a5187113 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_Logging.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_Logging.cpp @@ -252,7 +252,6 @@ void NavEKF2_core::Log_Write_Beacon(uint64_t time_us) void NavEKF2_core::Log_Write_Timing(uint64_t time_us) { // log EKF timing statistics every 5s - static uint32_t lastTimingLogTime_ms = 0; if (AP::dal().millis() - lastTimingLogTime_ms <= 5000) { return; } diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_core.h b/libraries/AP_NavEKF2/AP_NavEKF2_core.h index e4035ae286..e2254f87f9 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_core.h +++ b/libraries/AP_NavEKF2/AP_NavEKF2_core.h @@ -1178,6 +1178,9 @@ private: uint8_t EKFGSF_yaw_reset_count; // number of emergency yaw resets performed bool EKFGSF_run_filterbank; // true when the filter bank is active + // logging timestamps + uint32_t lastTimingLogTime_ms; + // logging functions shared by cores: void Log_Write_NKF1(uint64_t time_us) const; void Log_Write_NKF2(uint64_t time_us) const;