Compass_VRBrain: get_primary made public
This commit is contained in:
parent
d291594d7c
commit
c16672a529
@ -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;
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user