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