Copter: sonar pre-arm check only if optflow enabled
This commit is contained in:
parent
43d6060ba7
commit
5e40ad5c38
@ -513,9 +513,9 @@ bool Copter::pre_arm_checks(bool display_failure)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_SONAR == ENABLED
|
#if CONFIG_SONAR == ENABLED && OPTFLOW == ENABLED
|
||||||
// check range finder
|
// check range finder if optflow enabled
|
||||||
if (!sonar.pre_arm_check()) {
|
if (optflow.enabled() && !sonar.pre_arm_check()) {
|
||||||
if (display_failure) {
|
if (display_failure) {
|
||||||
gcs_send_text_P(SEVERITY_HIGH,PSTR("PreArm: check range finder"));
|
gcs_send_text_P(SEVERITY_HIGH,PSTR("PreArm: check range finder"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user