From dff9fe9cb2fa0d323ae0072f19563d1236484ab4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 8 Sep 2015 15:51:00 +1000 Subject: [PATCH] Copter: use prearm_failure_reason() --- ArduCopter/motors.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ArduCopter/motors.cpp b/ArduCopter/motors.cpp index 592c4a5b1c..def54a4b5b 100644 --- a/ArduCopter/motors.cpp +++ b/ArduCopter/motors.cpp @@ -654,7 +654,12 @@ bool Copter::pre_arm_gps_checks(bool display_failure) // ensure GPS is ok if (!position_ok()) { if (display_failure) { - gcs_send_text_P(MAV_SEVERITY_CRITICAL,PSTR("PreArm: Need 3D Fix")); + const char *reason = ahrs.prearm_failure_reason(); + if (reason) { + GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_CRITICAL, PSTR("PreArm: %s"), reason); + } else { + gcs_send_text_P(MAV_SEVERITY_CRITICAL,PSTR("PreArm: Need 3D Fix")); + } } AP_Notify::flags.pre_arm_gps_check = false; return false;