AP_Arming: add flight mode conflict check

This commit is contained in:
Tatsuya Yamaguchi 2021-06-17 10:14:31 +09:00 committed by Peter Barker
parent 5a8ebeda1d
commit fb682a61cb
1 changed files with 4 additions and 0 deletions

View File

@ -578,6 +578,10 @@ bool AP_Arming::rc_arm_checks(AP_Arming::Method method)
check_failed(ARMING_CHECK_PARAMETERS, true, "Duplicate Aux Switch Options");
check_passed = false;
}
if (rc().flight_mode_channel_conflicts_with_rc_option()) {
check_failed(ARMING_CHECK_PARAMETERS, true, "Mode channel and RC%d_OPTION conflict", rc().flight_mode_channel_number());
check_passed = false;
}
const RCMapper * rcmap = AP::rcmap();
if (rcmap != nullptr) {
if (!rc().arming_skip_checks_rpy()) {