mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 09:58:28 -04:00
Plane: report baro health to GCS
This commit is contained in:
parent
1e374ab42b
commit
b619c3956c
@ -205,8 +205,9 @@ static NOINLINE void send_extended_status1(mavlink_channel_t chan)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// default: all present sensors healthy except 3D_MAG, GPS, DIFFERNTIAL_PRESSURE. GEOFENCE always defaults to healthy.
|
// default: all present sensors healthy except baro, 3D_MAG, GPS, DIFFERNTIAL_PRESSURE. GEOFENCE always defaults to healthy.
|
||||||
control_sensors_health = control_sensors_present & ~(MAV_SYS_STATUS_SENSOR_3D_MAG |
|
control_sensors_health = control_sensors_present & ~(MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE |
|
||||||
|
MAV_SYS_STATUS_SENSOR_3D_MAG |
|
||||||
MAV_SYS_STATUS_SENSOR_GPS |
|
MAV_SYS_STATUS_SENSOR_GPS |
|
||||||
MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE);
|
MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE);
|
||||||
control_sensors_health |= MAV_SYS_STATUS_GEOFENCE;
|
control_sensors_health |= MAV_SYS_STATUS_GEOFENCE;
|
||||||
@ -215,7 +216,9 @@ static NOINLINE void send_extended_status1(mavlink_channel_t chan)
|
|||||||
// AHRS subsystem is unhealthy
|
// AHRS subsystem is unhealthy
|
||||||
control_sensors_health &= ~MAV_SYS_STATUS_AHRS;
|
control_sensors_health &= ~MAV_SYS_STATUS_AHRS;
|
||||||
}
|
}
|
||||||
|
if (barometer.healthy) {
|
||||||
|
control_sensors_health |= MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE;
|
||||||
|
}
|
||||||
if (g.compass_enabled && compass.healthy(0) && ahrs.use_compass()) {
|
if (g.compass_enabled && compass.healthy(0) && ahrs.use_compass()) {
|
||||||
control_sensors_health |= MAV_SYS_STATUS_SENSOR_3D_MAG;
|
control_sensors_health |= MAV_SYS_STATUS_SENSOR_3D_MAG;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user