|
|
|
@ -63,6 +63,7 @@ bool AP_Arming_Copter::run_pre_arm_checks(bool display_failure)
@@ -63,6 +63,7 @@ bool AP_Arming_Copter::run_pre_arm_checks(bool display_failure)
|
|
|
|
|
& oa_checks(display_failure) |
|
|
|
|
& gcs_failsafe_check(display_failure) |
|
|
|
|
& winch_checks(display_failure) |
|
|
|
|
& alt_checks(display_failure) |
|
|
|
|
& AP_Arming::pre_arm_checks(display_failure); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -605,6 +606,18 @@ bool AP_Arming_Copter::winch_checks(bool display_failure) const
@@ -605,6 +606,18 @@ bool AP_Arming_Copter::winch_checks(bool display_failure) const
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// performs altitude checks. returns true if passed
|
|
|
|
|
bool AP_Arming_Copter::alt_checks(bool display_failure) |
|
|
|
|
{ |
|
|
|
|
// always EKF altitude estimate
|
|
|
|
|
if (!copter.flightmode->has_manual_throttle() && !copter.ekf_alt_ok()) { |
|
|
|
|
check_failed(display_failure, "Need Alt Estimate"); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// arm_checks - perform final checks before arming
|
|
|
|
|
// always called just before arming. Return true if ok to arm
|
|
|
|
|
// has side-effect that logging is started
|
|
|
|
@ -729,8 +742,14 @@ bool AP_Arming_Copter::arm_checks(AP_Arming::Method method)
@@ -729,8 +742,14 @@ bool AP_Arming_Copter::arm_checks(AP_Arming::Method method)
|
|
|
|
|
bool AP_Arming_Copter::mandatory_checks(bool display_failure) |
|
|
|
|
{ |
|
|
|
|
// call mandatory gps checks and update notify status because regular gps checks will not run
|
|
|
|
|
const bool result = mandatory_gps_checks(display_failure); |
|
|
|
|
bool result = mandatory_gps_checks(display_failure); |
|
|
|
|
AP_Notify::flags.pre_arm_gps_check = result; |
|
|
|
|
|
|
|
|
|
// call mandatory alt check
|
|
|
|
|
if (!alt_checks(display_failure)) { |
|
|
|
|
result = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|