Rover: remove bogus ARMING_CHECK_NONE 'bitmask value'

This commit is contained in:
Peter Barker 2019-10-05 07:51:02 +10:00 committed by Andrew Tridgell
parent 6db60ec711
commit c26f98e817

View File

@ -47,13 +47,13 @@ bool AP_Arming_Rover::gps_checks(bool display_failure)
if (reason == nullptr) { if (reason == nullptr) {
reason = "AHRS not healthy"; reason = "AHRS not healthy";
} }
check_failed(ARMING_CHECK_NONE, display_failure, "%s", reason); check_failed(display_failure, "%s", reason);
return false; return false;
} }
// check for ekf failsafe // check for ekf failsafe
if (rover.failsafe.ekf) { if (rover.failsafe.ekf) {
check_failed(ARMING_CHECK_NONE, display_failure, "EKF failsafe"); check_failed(display_failure, "EKF failsafe");
return false; return false;
} }
@ -63,7 +63,7 @@ bool AP_Arming_Rover::gps_checks(bool display_failure)
if (reason == nullptr) { if (reason == nullptr) {
reason = "Need Position Estimate"; reason = "Need Position Estimate";
} }
check_failed(ARMING_CHECK_NONE, display_failure, "%s", reason); check_failed(display_failure, "%s", reason);
return false; return false;
} }
@ -74,11 +74,11 @@ bool AP_Arming_Rover::gps_checks(bool display_failure)
bool AP_Arming_Rover::pre_arm_checks(bool report) bool AP_Arming_Rover::pre_arm_checks(bool report)
{ {
//are arming checks disabled? //are arming checks disabled?
if (checks_to_perform == ARMING_CHECK_NONE) { if (checks_to_perform == 0) {
return true; return true;
} }
if (SRV_Channels::get_emergency_stop()) { if (SRV_Channels::get_emergency_stop()) {
check_failed(ARMING_CHECK_NONE, report, "Motors Emergency Stopped"); check_failed(report, "Motors Emergency Stopped");
return false; return false;
} }
@ -92,7 +92,7 @@ bool AP_Arming_Rover::pre_arm_checks(bool report)
bool AP_Arming_Rover::arm_checks(AP_Arming::Method method) bool AP_Arming_Rover::arm_checks(AP_Arming::Method method)
{ {
//are arming checks disabled? //are arming checks disabled?
if (checks_to_perform == ARMING_CHECK_NONE) { if (checks_to_perform == 0) {
return true; return true;
} }
return AP_Arming::arm_checks(method); return AP_Arming::arm_checks(method);
@ -171,9 +171,9 @@ bool AP_Arming_Rover::oa_check(bool report)
// display failure // display failure
if (strlen(failure_msg) == 0) { if (strlen(failure_msg) == 0) {
check_failed(ARMING_CHECK_NONE, report, "Check Object Avoidance"); check_failed(report, "Check Object Avoidance");
} else { } else {
check_failed(ARMING_CHECK_NONE, report, "%s", failure_msg); check_failed(report, "%s", failure_msg);
} }
return false; return false;
} }