From 2261f94361e127cb4f1d3ff5ea7b03bc9f13eb32 Mon Sep 17 00:00:00 2001 From: "Dr.-Ing. Amilcar do Carmo Lucas" Date: Fri, 9 Oct 2020 13:33:21 +0200 Subject: [PATCH] ArduCopter: Mark motors un-healthy if any motors are not producing thrust --- ArduCopter/GCS_Copter.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ArduCopter/GCS_Copter.cpp b/ArduCopter/GCS_Copter.cpp index acee83e333..55b8e821d4 100644 --- a/ArduCopter/GCS_Copter.cpp +++ b/ArduCopter/GCS_Copter.cpp @@ -150,4 +150,12 @@ void GCS_Copter::update_vehicle_sensor_status_flags(void) break; } #endif + + control_sensors_present |= MAV_SYS_STATUS_SENSOR_PROPULSION; + control_sensors_enabled |= MAV_SYS_STATUS_SENSOR_PROPULSION; + // only mark propulsion healthy if all of the motors are producing + // nominal thrust + if (!copter.motors->get_thrust_boost()) { + control_sensors_health |= MAV_SYS_STATUS_SENSOR_PROPULSION; + } }