diff --git a/libraries/AP_AHRS/AP_AHRS.h b/libraries/AP_AHRS/AP_AHRS.h index bdccc31a90..50bdc61d3c 100644 --- a/libraries/AP_AHRS/AP_AHRS.h +++ b/libraries/AP_AHRS/AP_AHRS.h @@ -254,7 +254,7 @@ public: virtual bool get_position(struct Location &loc) const = 0; // get latest altitude estimate above ground level in meters and validity flag - virtual bool get_hagl(float &height) const { return false; } + virtual bool get_hagl(float &height) const WARN_IF_UNUSED { return false; } // return a wind estimation vector, in m/s virtual Vector3f wind_estimate(void) const = 0; diff --git a/libraries/AP_AHRS/AP_AHRS_NavEKF.h b/libraries/AP_AHRS/AP_AHRS_NavEKF.h index 005236110a..96ebfa7ef0 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.h +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.h @@ -83,7 +83,7 @@ public: bool get_position(struct Location &loc) const override; // get latest altitude estimate above ground level in meters and validity flag - bool get_hagl(float &hagl) const override; + bool get_hagl(float &hagl) const override WARN_IF_UNUSED; // status reporting of estimated error float get_error_rp() const override;