AP_Logger: log unhealthy barometers

This commit is contained in:
Andrew Tridgell 2020-09-05 14:18:24 +10:00
parent 7ae64d20aa
commit bea9769b82
1 changed files with 2 additions and 2 deletions

View File

@ -294,10 +294,10 @@ void AP_Logger::Write_Baro(uint64_t time_us)
}
const AP_Baro &baro = AP::baro();
Write_Baro_instance(time_us, 0, LOG_BARO_MSG);
if (baro.num_instances() > 1 && baro.healthy(1)) {
if (baro.num_instances() > 1) {
Write_Baro_instance(time_us, 1, LOG_BAR2_MSG);
}
if (baro.num_instances() > 2 && baro.healthy(2)) {
if (baro.num_instances() > 2) {
Write_Baro_instance(time_us, 2, LOG_BAR3_MSG);
}
}