AP_Compass: use AP::compass().available in place of enabled()

This commit is contained in:
Peter Barker 2021-07-28 10:27:38 +10:00 committed by Peter Barker
parent 8c2cf123af
commit c351150a46
2 changed files with 1 additions and 3 deletions

View File

@ -681,7 +681,7 @@ Compass::Compass(void)
//
void Compass::init()
{
if (!AP::compass().enabled()) {
if (!_enabled) {
return;
}

View File

@ -102,8 +102,6 @@ public:
///
bool read();
bool enabled() const { return _enabled; }
// available returns true if the compass is both enabled and has
// been initialised
bool available() const { return _enabled && init_done; }