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,7 +193,10 @@ NOINLINE void Sub::send_extended_status1(mavlink_channel_t chan)
|
||||||
MAV_SYS_STATUS_SENSOR_3D_MAG |
|
MAV_SYS_STATUS_SENSOR_3D_MAG |
|
||||||
MAV_SYS_STATUS_SENSOR_GPS |
|
MAV_SYS_STATUS_SENSOR_GPS |
|
||||||
MAV_SYS_STATUS_SENSOR_RC_RECEIVER);
|
MAV_SYS_STATUS_SENSOR_RC_RECEIVER);
|
||||||
if (barometer.all_healthy()) {
|
|
||||||
|
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;
|
control_sensors_health |= MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE;
|
||||||
}
|
}
|
||||||
if (g.compass_enabled && compass.healthy() && ahrs.use_compass()) {
|
if (g.compass_enabled && compass.healthy() && ahrs.use_compass()) {
|
||||||
|
|
Loading…
Reference in New Issue