Browse Source

AP_Arming: Run extra GPS checks when arming

mission-4.1.18
Michael du Breuil 7 years ago committed by Francisco Ferreira
parent
commit
ef0b52e017
  1. 8
      libraries/AP_Arming/AP_Arming.cpp

8
libraries/AP_Arming/AP_Arming.cpp

@ -509,6 +509,14 @@ bool AP_Arming::pre_arm_checks(bool report) @@ -509,6 +509,14 @@ bool AP_Arming::pre_arm_checks(bool report)
bool AP_Arming::arm_checks(uint8_t method)
{
// ensure the GPS drivers are ready on any final changes
if ((checks_to_perform & ARMING_CHECK_ALL) ||
(checks_to_perform & ARMING_CHECK_GPS_CONFIG)) {
if (!AP_GPS::gps().prepare_for_arming()) {
return false;
}
}
// note that this will prepare DataFlash to start logging
// so should be the last check to be done before arming
if ((checks_to_perform & ARMING_CHECK_ALL) ||

Loading…
Cancel
Save