Copter: make rc-in-failsafe checks a prearm check rather than an at-arm check
This commit is contained in:
parent
1e3f37908c
commit
cb9f376638
@ -56,6 +56,7 @@ bool AP_Arming_Copter::run_pre_arm_checks(bool display_failure)
|
|||||||
& oa_checks(display_failure)
|
& oa_checks(display_failure)
|
||||||
& gcs_failsafe_check(display_failure)
|
& gcs_failsafe_check(display_failure)
|
||||||
& winch_checks(display_failure)
|
& winch_checks(display_failure)
|
||||||
|
& rc_throttle_failsafe_checks(display_failure)
|
||||||
& alt_checks(display_failure)
|
& alt_checks(display_failure)
|
||||||
#if AP_AIRSPEED_ENABLED
|
#if AP_AIRSPEED_ENABLED
|
||||||
& AP_Arming::airspeed_checks(display_failure)
|
& AP_Arming::airspeed_checks(display_failure)
|
||||||
@ -65,6 +66,12 @@ bool AP_Arming_Copter::run_pre_arm_checks(bool display_failure)
|
|||||||
|
|
||||||
bool AP_Arming_Copter::rc_throttle_failsafe_checks(bool display_failure) const
|
bool AP_Arming_Copter::rc_throttle_failsafe_checks(bool display_failure) const
|
||||||
{
|
{
|
||||||
|
if ((checks_to_perform != ARMING_CHECK_ALL) &&
|
||||||
|
(checks_to_perform & ARMING_CHECK_RC) == 0) {
|
||||||
|
// this check has been disabled
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// throttle failsafe. In this case the parameter also gates the
|
// throttle failsafe. In this case the parameter also gates the
|
||||||
// no-pulses RC failure case - the radio-in value can be zero due
|
// no-pulses RC failure case - the radio-in value can be zero due
|
||||||
// to not having received any RC pulses at all. Note that if we
|
// to not having received any RC pulses at all. Note that if we
|
||||||
@ -625,10 +632,6 @@ bool AP_Arming_Copter::arm_checks(AP_Arming::Method method)
|
|||||||
|
|
||||||
// check throttle
|
// check throttle
|
||||||
if ((checks_to_perform == ARMING_CHECK_ALL) || (checks_to_perform & ARMING_CHECK_RC)) {
|
if ((checks_to_perform == ARMING_CHECK_ALL) || (checks_to_perform & ARMING_CHECK_RC)) {
|
||||||
if (!rc_throttle_failsafe_checks(true)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if FRAME_CONFIG == HELI_FRAME
|
#if FRAME_CONFIG == HELI_FRAME
|
||||||
const char *rc_item = "Collective";
|
const char *rc_item = "Collective";
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user