AP_NavEKF2: Update publishing of primary core index

Changes made in response to review comments
This commit is contained in:
Paul Riseborough 2015-11-06 14:04:22 +11:00 committed by Andrew Tridgell
parent 1858da8307
commit 2dcaeb0304
2 changed files with 6 additions and 7 deletions

View File

@ -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;
}

View File

@ -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