From ce04d69d5381d26283b4d1816f0920d2a575b390 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 7 Mar 2024 18:52:58 +1100 Subject: [PATCH] AP_NavEKF3: correct compilation in SITL when logging is disabled this code is gated on HAL_BOARD_SITL already, and usually we have logging in SITL. But not always --- libraries/AP_NavEKF3/AP_NavEKF3_core.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_NavEKF3/AP_NavEKF3_core.cpp b/libraries/AP_NavEKF3/AP_NavEKF3_core.cpp index ae1f4d09a1..d689ab8591 100644 --- a/libraries/AP_NavEKF3/AP_NavEKF3_core.cpp +++ b/libraries/AP_NavEKF3/AP_NavEKF3_core.cpp @@ -2147,6 +2147,7 @@ void NavEKF3_core::bestRotationOrder(rotationOrder &order) // and log with value generated by NavEKF3_core::calcTiltErrorVariance() void NavEKF3_core::verifyTiltErrorVariance() { +#if HAL_LOGGING_ENABLED const Vector3f gravity_ef = Vector3f(0.0f,0.0f,1.0f); Matrix3f Tnb; const float quat_delta = 0.001f; @@ -2186,6 +2187,7 @@ void NavEKF3_core::verifyTiltErrorVariance() }; AP::logger().WriteBlock(&msg, sizeof(msg)); } +#endif // HAL_LOGGING_ENABLED } #endif