mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
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:
parent
e56c970eb0
commit
6bac6cd725
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user