From 7e13edd4c77dcff56b52d4583e2fd229fcff0401 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 8 Sep 2015 15:50:52 +1000 Subject: [PATCH] AP_Arming: use prearm_failure_reason() --- libraries/AP_Arming/AP_Arming.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Arming/AP_Arming.cpp b/libraries/AP_Arming/AP_Arming.cpp index 6a456e7899..f5cd4afb7a 100644 --- a/libraries/AP_Arming/AP_Arming.cpp +++ b/libraries/AP_Arming/AP_Arming.cpp @@ -144,7 +144,12 @@ bool AP_Arming::ins_checks(bool report) } if (!ahrs.healthy()) { if (report) { - GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_CRITICAL, PSTR("PreArm: AHRS not healthy!")); + const char *reason = ahrs.prearm_failure_reason(); + if (reason) { + GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_CRITICAL, PSTR("PreArm: %s"), reason); + } else { + GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_CRITICAL, PSTR("PreArm: AHRS not healthy!")); + } } return false; }