From b4961971e06dff77ea232fe64e54b93e789f6277 Mon Sep 17 00:00:00 2001 From: priseborough Date: Wed, 26 Oct 2016 08:56:59 +1100 Subject: [PATCH] AP_AHRS: add beacon object to ahrs --- libraries/AP_AHRS/AP_AHRS.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libraries/AP_AHRS/AP_AHRS.h b/libraries/AP_AHRS/AP_AHRS.h index becae6ce4b..bec050ca9d 100644 --- a/libraries/AP_AHRS/AP_AHRS.h +++ b/libraries/AP_AHRS/AP_AHRS.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -57,6 +58,7 @@ public: _compass(nullptr), _optflow(nullptr), _airspeed(nullptr), + _beacon(nullptr), _compass_last_update(0), _ins(ins), _baro(baro), @@ -149,10 +151,18 @@ public: _airspeed = airspeed; } + void set_beacon(AP_Beacon *beacon) { + _beacon = beacon; + } + const AP_Airspeed *get_airspeed(void) const { return _airspeed; } + const AP_Beacon *get_beacon(void) const { + return _beacon; + } + const AP_GPS &get_gps() const { return _gps; } @@ -513,6 +523,9 @@ protected: // pointer to airspeed object, if available AP_Airspeed * _airspeed; + // pointer to beacon object, if available + AP_Beacon * _beacon; + // time in microseconds of last compass update uint32_t _compass_last_update;