AP_ExternalAHRS: added missing #if AHRS logging

This commit is contained in:
Pulak Gautam 2024-03-03 18:26:08 +05:30 committed by Peter Barker
parent b09dd7b866
commit 2d5e6a5f98
1 changed files with 2 additions and 0 deletions

View File

@ -301,6 +301,7 @@ void AP_ExternalAHRS::update(void)
state.have_origin = true; state.have_origin = true;
} }
} }
#if HAL_LOGGING_ENABLED
const uint32_t now_ms = AP_HAL::millis(); const uint32_t now_ms = AP_HAL::millis();
if (log_rate.get() > 0 && now_ms - last_log_ms >= uint32_t(1000U/log_rate.get())) { if (log_rate.get() > 0 && now_ms - last_log_ms >= uint32_t(1000U/log_rate.get())) {
last_log_ms = now_ms; last_log_ms = now_ms;
@ -334,6 +335,7 @@ void AP_ExternalAHRS::update(void)
state.location.lat, state.location.lng, state.location.alt*0.01, state.location.lat, state.location.lng, state.location.alt*0.01,
filterStatus.value); filterStatus.value);
} }
#endif // HAL_LOGGING_ENABLED
} }
// Get model/type name // Get model/type name