Copter: send optflow health in extended status

This commit is contained in:
Randy Mackay 2014-12-08 11:48:06 +09:00
parent 882546aa8e
commit 641c770726

View File

@ -203,6 +203,11 @@ static NOINLINE void send_extended_status1(mavlink_channel_t chan)
if (gps.status() > AP_GPS::NO_GPS && (!gps_glitch.glitching()||ap.usb_connected)) {
control_sensors_health |= MAV_SYS_STATUS_SENSOR_GPS;
}
#if OPTFLOW == ENABLED
if (optflow.healthy()) {
control_sensors_health |= MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW;
}
#endif
if (ap.rc_receiver_present && !failsafe.radio) {
control_sensors_health |= MAV_SYS_STATUS_SENSOR_RC_RECEIVER;
}