mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
Copter: use prearm_failure_reason()
This commit is contained in:
parent
7e13edd4c7
commit
dff9fe9cb2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user