diff --git a/libraries/AP_Compass/AP_Compass_VRBRAIN.cpp b/libraries/AP_Compass/AP_Compass_VRBRAIN.cpp index d8f55f1e54..3794016ec8 100644 --- a/libraries/AP_Compass/AP_Compass_VRBRAIN.cpp +++ b/libraries/AP_Compass/AP_Compass_VRBRAIN.cpp @@ -135,9 +135,9 @@ bool AP_Compass_VRBRAIN::read(void) _count[i] = 0; } - last_update = _last_timestamp[_get_primary()]; + last_update = _last_timestamp[get_primary()]; - return _healthy[_get_primary()]; + return _healthy[get_primary()]; } void AP_Compass_VRBRAIN::accumulate(void) @@ -153,7 +153,7 @@ void AP_Compass_VRBRAIN::accumulate(void) } } -uint8_t AP_Compass_VRBRAIN::_get_primary(void) const +uint8_t AP_Compass_VRBRAIN::get_primary(void) const { if (_primary < _num_instances && _healthy[_primary]) { return _primary; diff --git a/libraries/AP_Compass/AP_Compass_VRBRAIN.h b/libraries/AP_Compass/AP_Compass_VRBRAIN.h index 0a560f926c..eabcc048b8 100644 --- a/libraries/AP_Compass/AP_Compass_VRBRAIN.h +++ b/libraries/AP_Compass/AP_Compass_VRBRAIN.h @@ -19,8 +19,10 @@ public: // return the number of compass instances uint8_t get_count(void) const { return _num_instances; } -private: + // return the primary compass uint8_t _get_primary(void) const; + +private: uint8_t _num_instances; int _mag_fd[COMPASS_MAX_INSTANCES]; Vector3f _sum[COMPASS_MAX_INSTANCES];