diff --git a/ArduCopter/GCS_Mavlink.pde b/ArduCopter/GCS_Mavlink.pde index f764af63be..c758683c00 100644 --- a/ArduCopter/GCS_Mavlink.pde +++ b/ArduCopter/GCS_Mavlink.pde @@ -161,8 +161,10 @@ static NOINLINE void send_extended_status1(mavlink_channel_t chan) control_sensors_present |= MAV_SYS_STATUS_SENSOR_RC_RECEIVER; } - // all present sensors enabled by default except altitude and position control which we will set individually - control_sensors_enabled = control_sensors_present & (~MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL & ~MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL); + // all present sensors enabled by default except altitude and position control and motors which we will set individually + control_sensors_enabled = control_sensors_present & (~MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL & + ~MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL & + ~MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS); switch (control_mode) { case ALT_HOLD: @@ -182,6 +184,11 @@ static NOINLINE void send_extended_status1(mavlink_channel_t chan) break; } + // set motors outputs as enabled if safety switch is not disarmed (i.e. either NONE or ARMED) + if (hal.util->safety_switch_state() != AP_HAL::Util::SAFETY_DISARMED) { + control_sensors_enabled |= MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS; + } + // default to all healthy except baro, compass, gps and receiver which we set individually control_sensors_health = control_sensors_present & ~(MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE | MAV_SYS_STATUS_SENSOR_3D_MAG |