diff --git a/libraries/AP_NavEKF2/AP_NavEKF2.cpp b/libraries/AP_NavEKF2/AP_NavEKF2.cpp index 6c007a5d00..e42624b4b9 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2.cpp @@ -526,14 +526,13 @@ bool NavEKF2::healthy(void) const } // returns the index of the primary core -// return false if no primary core selected -bool NavEKF2::getPrimaryCoreIndex(uint8_t index) const +// return -1 if no primary core selected +int8_t NavEKF2::getPrimaryCoreIndex(void) const { if (!core) { - return false; + return -1; } - index = primary; - return true; + return primary; } diff --git a/libraries/AP_NavEKF2/AP_NavEKF2.h b/libraries/AP_NavEKF2/AP_NavEKF2.h index 7a9cf7d19c..f38ca1d398 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2.h +++ b/libraries/AP_NavEKF2/AP_NavEKF2.h @@ -58,8 +58,8 @@ public: bool healthy(void) const; // returns the index of the primary core - // return false if no primary core selected - bool getPrimaryCoreIndex(uint8_t index) const; + // return -1 if no primary core selected + int8_t getPrimaryCoreIndex(void) const; // Return the last calculated NED position relative to the reference point (m). // If a calculated solution is not available, use the best available data and return false