mirror of https://github.com/ArduPilot/ardupilot
Blimp: tidy setting of sensor status flags
This commit is contained in:
parent
cb7ac6fb54
commit
ed4dcea57a
|
@ -14,6 +14,7 @@ const char* GCS_Blimp::frame_string() const
|
|||
|
||||
void GCS_Blimp::update_vehicle_sensor_status_flags(void)
|
||||
{
|
||||
// mode-specific flags:
|
||||
control_sensors_present |=
|
||||
MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL |
|
||||
MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION |
|
||||
|
@ -29,18 +30,16 @@ void GCS_Blimp::update_vehicle_sensor_status_flags(void)
|
|||
MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION |
|
||||
MAV_SYS_STATUS_SENSOR_YAW_POSITION;
|
||||
|
||||
control_sensors_present |= MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL;
|
||||
control_sensors_present |= MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL;
|
||||
|
||||
const Blimp::ap_t &ap = blimp.ap;
|
||||
|
||||
if (ap.rc_receiver_present) {
|
||||
control_sensors_present |= MAV_SYS_STATUS_SENSOR_RC_RECEIVER;
|
||||
control_sensors_enabled |= MAV_SYS_STATUS_SENSOR_RC_RECEIVER;
|
||||
}
|
||||
|
||||
control_sensors_present |= MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL;
|
||||
control_sensors_present |= MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL;
|
||||
|
||||
if (ap.rc_receiver_present && !blimp.failsafe.radio) {
|
||||
control_sensors_health |= MAV_SYS_STATUS_SENSOR_RC_RECEIVER;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue