mirror of https://github.com/ArduPilot/ardupilot
GCS_MAVLink: move setting of MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW sensors flags up
This commit is contained in:
parent
3ef1b1031a
commit
342a5a71a9
|
@ -290,6 +290,17 @@ void GCS::update_sensor_status_flags()
|
|||
}
|
||||
#endif
|
||||
|
||||
#if AP_OPTICALFLOW_ENABLED
|
||||
const AP_OpticalFlow *optflow = AP::opticalflow();
|
||||
if (optflow && optflow->enabled()) {
|
||||
control_sensors_present |= MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW;
|
||||
control_sensors_enabled |= MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW;
|
||||
}
|
||||
if (optflow && optflow->healthy()) {
|
||||
control_sensors_health |= MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAL_VISUALODOM_ENABLED
|
||||
const AP_VisualOdom *visual_odom = AP::visualodom();
|
||||
if (visual_odom && visual_odom->enabled()) {
|
||||
|
|
Loading…
Reference in New Issue