diff --git a/libraries/AP_AHRS/AP_AHRS.h b/libraries/AP_AHRS/AP_AHRS.h index f6c727912a..3c9bb1ba7e 100644 --- a/libraries/AP_AHRS/AP_AHRS.h +++ b/libraries/AP_AHRS/AP_AHRS.h @@ -400,9 +400,8 @@ public: }; // return the amount of yaw angle change due to the last yaw angle reset in radians - // returns true if a reset yaw angle has been updated and not queried - // this function should not have more than one client - virtual bool getLastYawResetAngle(float &yawAng) { + // returns the time of the last yaw angle reset or 0 if no reset has ever occurred + virtual uint32_t getLastYawResetAngle(float &yawAng) { return false; }; diff --git a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp index eda1183ee0..923a888f42 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp @@ -679,9 +679,8 @@ const char *AP_AHRS_NavEKF::prearm_failure_reason(void) const } // return the amount of yaw angle change due to the last yaw angle reset in radians -// returns true if a reset yaw angle has been updated and not queried -// this function should not have more than one client -bool AP_AHRS_NavEKF::getLastYawResetAngle(float &yawAng) +// returns the time of the last yaw angle reset or 0 if no reset has ever occurred +uint32_t AP_AHRS_NavEKF::getLastYawResetAngle(float &yawAng) { switch (ekf_type()) { case 1: diff --git a/libraries/AP_AHRS/AP_AHRS_NavEKF.h b/libraries/AP_AHRS/AP_AHRS_NavEKF.h index 573c914ff8..e67403bb0d 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.h +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.h @@ -143,9 +143,8 @@ public: const char *prearm_failure_reason(void) const override; // return the amount of yaw angle change due to the last yaw angle reset in radians - // returns true if a reset yaw angle has been updated and not queried - // this function should not have more than one client - bool getLastYawResetAngle(float &yawAng); + // returns the time of the last yaw angle reset or 0 if no reset has ever occurred + uint32_t getLastYawResetAngle(float &yawAng); // Resets the baro so that it reads zero at the current height // Resets the EKF height to zero