AP_Periph: MSP fix last baro ms

This commit is contained in:
giacomo892 2020-12-18 10:04:54 +01:00 committed by Andrew Tridgell
parent 3c83eecf78
commit c8d874676f

View File

@ -128,11 +128,11 @@ void AP_Periph_FW::send_msp_baro(void)
if (msp.last_baro_ms == baro.get_last_update(0)) {
return;
}
msp.last_baro_ms = baro.get_last_update(0);
if (!baro.healthy()) {
// don't send any data
return;
}
msp.last_baro_ms = baro.get_last_update(0);
p.instance = 0;
p.time_ms = msp.last_baro_ms;