AP_Baro: only log dynamic pressure when compensation is enabled

This commit is contained in:
Andy Piper 2022-12-01 20:28:38 +00:00 committed by Andrew Tridgell
parent 5358b4d8de
commit 7b9126d612
1 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,10 @@ void AP_Baro::Write_Baro_instance(uint64_t time_us, uint8_t baro_instance)
};
AP::logger().WriteBlock(&pkt, sizeof(pkt));
#if HAL_BARO_WIND_COMP_ENABLED
if (!sensors[baro_instance].wind_coeff.enable) {
return;
}
const struct log_BARD pkt2{
LOG_PACKET_HEADER_INIT(LOG_BARD_MSG),
time_us : time_us,