From 8e9dc1c3930b94fc7c61598062bdd03932fd71c8 Mon Sep 17 00:00:00 2001
From: Paul Riseborough <gncsolns@gmail.com>
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 5d0ed9e9e4..153dbb9495 100644
--- a/libraries/AP_Compass/AP_Compass.h
+++ b/libraries/AP_Compass/AP_Compass.h
@@ -216,6 +216,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;