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;