mirror of https://github.com/ArduPilot/ardupilot
Rover: move setting of GPS SYS_STATUS bits up to base class
This commit is contained in:
parent
b48da34c61
commit
49f26f08e1
|
@ -23,11 +23,6 @@ bool GCS_Rover::supersimple_input_active() const
|
||||||
void GCS_Rover::update_vehicle_sensor_status_flags(void)
|
void GCS_Rover::update_vehicle_sensor_status_flags(void)
|
||||||
{
|
{
|
||||||
// first what sensors/controllers we have
|
// first what sensors/controllers we have
|
||||||
const AP_GPS &gps = AP::gps();
|
|
||||||
if (gps.status() > AP_GPS::NO_GPS) {
|
|
||||||
control_sensors_present |= MAV_SYS_STATUS_SENSOR_GPS;
|
|
||||||
control_sensors_enabled |= MAV_SYS_STATUS_SENSOR_GPS;
|
|
||||||
}
|
|
||||||
const AP_VisualOdom *visual_odom = AP::visualodom();
|
const AP_VisualOdom *visual_odom = AP::visualodom();
|
||||||
if (visual_odom && visual_odom->enabled()) {
|
if (visual_odom && visual_odom->enabled()) {
|
||||||
control_sensors_present |= MAV_SYS_STATUS_SENSOR_VISION_POSITION;
|
control_sensors_present |= MAV_SYS_STATUS_SENSOR_VISION_POSITION;
|
||||||
|
@ -58,9 +53,6 @@ void GCS_Rover::update_vehicle_sensor_status_flags(void)
|
||||||
control_sensors_health |= MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL; // X/Y position control
|
control_sensors_health |= MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL; // X/Y position control
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gps.is_healthy()) {
|
|
||||||
control_sensors_health |= MAV_SYS_STATUS_SENSOR_GPS;
|
|
||||||
}
|
|
||||||
if (visual_odom && visual_odom->enabled() && visual_odom->healthy()) {
|
if (visual_odom && visual_odom->enabled() && visual_odom->healthy()) {
|
||||||
control_sensors_health |= MAV_SYS_STATUS_SENSOR_VISION_POSITION;
|
control_sensors_health |= MAV_SYS_STATUS_SENSOR_VISION_POSITION;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue