AP_AHRS: return failure in pre_arm_check if unhealthy

This commit is contained in:
Peter Barker 2022-01-14 12:00:24 +11:00 committed by Andrew Tridgell
parent 13050b325b
commit a6099acd5c
1 changed files with 2 additions and 2 deletions

View File

@ -2036,11 +2036,11 @@ bool AP_AHRS::pre_arm_check(bool requires_position, char *failure_msg, uint8_t f
return ret;
#endif
case EKFType::NONE:
return dcm.pre_arm_check(requires_position, failure_msg, failure_msg_len);
return dcm.pre_arm_check(requires_position, failure_msg, failure_msg_len) && ret;
#if HAL_EXTERNAL_AHRS_ENABLED
case EKFType::EXTERNAL:
return AP::externalAHRS().pre_arm_check(failure_msg, failure_msg_len);
return AP::externalAHRS().pre_arm_check(failure_msg, failure_msg_len) && ret;
#endif
#if HAL_NAVEKF2_AVAILABLE