mirror of https://github.com/ArduPilot/ardupilot
GCS_MAVLink: correct sensors when no baros found
GCSs will know we have no baros on-board, as will the RC telemetry library
This commit is contained in:
parent
c4a67bbdc3
commit
b85e77a0d4
|
@ -177,11 +177,13 @@ void GCS::update_sensor_status_flags()
|
|||
|
||||
#if !defined(HAL_BUILD_AP_PERIPH) || defined(HAL_PERIPH_ENABLE_BARO)
|
||||
const AP_Baro &barometer = AP::baro();
|
||||
if (barometer.num_instances() > 0) {
|
||||
control_sensors_present |= MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE;
|
||||
control_sensors_enabled |= MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE;
|
||||
if (barometer.all_healthy()) {
|
||||
control_sensors_health |= MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(HAL_BUILD_AP_PERIPH) || defined(HAL_PERIPH_ENABLE_GPS)
|
||||
|
|
Loading…
Reference in New Issue