Skip to content

Commit

Permalink
Copter: INS prearm failures take priority over EKF prearm failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jschall committed Oct 30, 2015
1 parent 2d7b27b commit 29e4062
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions ArduCopter/motors.pde
Original file line number Diff line number Diff line change
Expand Up @@ -332,20 +332,6 @@ static bool pre_arm_checks(bool display_failure)
}
}

// check GPS
if (!pre_arm_gps_checks(display_failure)) {
return false;
}

#if AC_FENCE == ENABLED
// check fence is initialised
if(!fence.pre_arm_check()) {
if (display_failure) {
gcs_send_text_P(SEVERITY_HIGH,PSTR("PreArm: check fence"));
}
return false;
}
#endif

// check INS
if ((g.arming_check == ARMING_CHECK_ALL) || (g.arming_check & ARMING_CHECK_INS)) {
Expand Down Expand Up @@ -423,6 +409,22 @@ static bool pre_arm_checks(bool display_failure)
}
#endif
}

// check GPS
if (!pre_arm_gps_checks(display_failure)) {
return false;
}

#if AC_FENCE == ENABLED
// check fence is initialised
if(!fence.pre_arm_check()) {
if (display_failure) {
gcs_send_text_P(SEVERITY_HIGH,PSTR("PreArm: check fence"));
}
return false;
}
#endif

#if CONFIG_HAL_BOARD != HAL_BOARD_VRBRAIN
#ifndef CONFIG_ARCH_BOARD_PX4FMU_V1
// check board voltage
Expand Down

0 comments on commit 29e4062

Please sign in to comment.