From 251c1e379f2c14b23b8da7ac88ebf53f99b45087 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Sun, 26 Apr 2020 08:10:38 +1000 Subject: [PATCH] AP_Compass: Add accessor function for COMPASS_AUTODEC --- libraries/AP_Compass/AP_Compass.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_Compass/AP_Compass.h b/libraries/AP_Compass/AP_Compass.h index 77da354299..ba9fae9004 100644 --- a/libraries/AP_Compass/AP_Compass.h +++ b/libraries/AP_Compass/AP_Compass.h @@ -202,6 +202,8 @@ public: void set_declination(float radians, bool save_to_eeprom = true); float get_declination() const; + bool auto_declination_enabled() const { return _auto_declination != 0; } + // set overall board orientation void set_board_orientation(enum Rotation orientation, Matrix3f* custom_rotation = nullptr) { _board_orientation = orientation;