Copter: remove redundant compass arming checks

These are already part of prearm checks in the parent class, which must also pass for us to arm
This commit is contained in:
Peter Barker 2019-03-27 17:29:04 +11:00 committed by Randy Mackay
parent e56c970eb0
commit 6bac6cd725
1 changed files with 1 additions and 12 deletions

View File

@ -453,8 +453,8 @@ bool AP_Arming_Copter::arm_checks(bool display_failure, AP_Arming::Method method
return false;
}
const Compass &_compass = AP::compass();
#ifndef ALLOW_ARM_NO_COMPASS
const Compass &_compass = AP::compass();
// check compass health
if (!_compass.healthy()) {
check_failed(ARMING_CHECK_NONE, display_failure, "Compass not healthy");
@ -462,17 +462,6 @@ bool AP_Arming_Copter::arm_checks(bool display_failure, AP_Arming::Method method
}
#endif
if (_compass.is_calibrating()) {
check_failed(ARMING_CHECK_NONE, display_failure, "Compass calibration running");
return false;
}
//check if compass has calibrated and requires reboot
if (_compass.compass_cal_requires_reboot()) {
check_failed(ARMING_CHECK_NONE, display_failure, "Compass calibrated requires reboot");
return false;
}
control_mode_t control_mode = copter.control_mode;
// always check if the current mode allows arming