mirror of https://github.com/ArduPilot/ardupilot
Sub: Check if depth sensor is present for sensor reporting
This commit is contained in:
parent
456f5e2e93
commit
974af85f42
|
@ -193,9 +193,12 @@ NOINLINE void Sub::send_extended_status1(mavlink_channel_t chan)
|
|||
MAV_SYS_STATUS_SENSOR_3D_MAG |
|
||||
MAV_SYS_STATUS_SENSOR_GPS |
|
||||
MAV_SYS_STATUS_SENSOR_RC_RECEIVER);
|
||||
if (barometer.all_healthy()) {
|
||||
control_sensors_health |= MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE;
|
||||
}
|
||||
|
||||
if (ap.depth_sensor_present && barometer.all_healthy()) { // check all barometers
|
||||
control_sensors_health |= MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE;
|
||||
} else if (barometer.healthy(0)) { // check the internal barometer only
|
||||
control_sensors_health |= MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE;
|
||||
}
|
||||
if (g.compass_enabled && compass.healthy() && ahrs.use_compass()) {
|
||||
control_sensors_health |= MAV_SYS_STATUS_SENSOR_3D_MAG;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue