Skip to content

Commit

Permalink
Copter: Suppress multiple anomaly alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
muramura committed Aug 10, 2024
1 parent ff30224 commit c708772
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ArduCopter/AP_Arming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ bool AP_Arming_Copter::run_pre_arm_checks(bool display_failure)
// check if motor interlock aux switch is in use
// if it is, switch needs to be in disabled position to arm
// otherwise exit immediately.
if (copter.ap.using_interlock && copter.ap.motor_interlock_switch) {
if (passed && copter.ap.using_interlock && copter.ap.motor_interlock_switch) {
check_failed(display_failure, "Motor Interlock Enabled");
passed = false;
}

if (!disarm_switch_checks(display_failure)) {
if (passed && !disarm_switch_checks(display_failure)) {
passed = false;
}

// always check motors
char failure_msg[50] {};
if (!copter.motors->arming_checks(ARRAY_SIZE(failure_msg), failure_msg)) {
if (passed && !copter.motors->arming_checks(ARRAY_SIZE(failure_msg), failure_msg)) {
check_failed(display_failure, "Motors: %s", failure_msg);
passed = false;
}
Expand Down

0 comments on commit c708772

Please sign in to comment.