AP_NavEKF2: add prearm failure message for null core pointer

This commit is contained in:
Mark Whitehorn 2019-10-25 21:23:45 -06:00 committed by Andrew Tridgell
parent 8b2b7444d3
commit 32a5ea13b4
1 changed files with 1 additions and 1 deletions

View File

@ -1455,7 +1455,7 @@ uint32_t NavEKF2::getLastVelNorthEastReset(Vector2f &vel) const
const char *NavEKF2::prearm_failure_reason(void) const const char *NavEKF2::prearm_failure_reason(void) const
{ {
if (!core) { if (!core) {
return nullptr; return "no EKF2 cores";
} }
for (uint8_t i = 0; i < num_cores; i++) { for (uint8_t i = 0; i < num_cores; i++) {
const char * failure = core[i].prearm_failure_reason(); const char * failure = core[i].prearm_failure_reason();