Skip to content

Commit

Permalink
AP_ExternalAHRS: added missing #if AHRS logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pulak-gautam authored and peterbarker committed Mar 5, 2024
1 parent b09dd7b commit 2d5e6a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/AP_ExternalAHRS/AP_ExternalAHRS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ void AP_ExternalAHRS::update(void)
state.have_origin = true;
}
}
#if HAL_LOGGING_ENABLED
const uint32_t now_ms = AP_HAL::millis();
if (log_rate.get() > 0 && now_ms - last_log_ms >= uint32_t(1000U/log_rate.get())) {
last_log_ms = now_ms;
Expand Down Expand Up @@ -334,6 +335,7 @@ void AP_ExternalAHRS::update(void)
state.location.lat, state.location.lng, state.location.alt*0.01,
filterStatus.value);
}
#endif // HAL_LOGGING_ENABLED
}

// Get model/type name
Expand Down

0 comments on commit 2d5e6a5

Please sign in to comment.