Browse Source

AP_AHRS: constify getLastYawResetAngle

master
Randy Mackay 9 years ago
parent
commit
7c20577ee0
  1. 4
      libraries/AP_AHRS/AP_AHRS.h
  2. 4
      libraries/AP_AHRS/AP_AHRS_NavEKF.cpp
  3. 2
      libraries/AP_AHRS/AP_AHRS_NavEKF.h

4
libraries/AP_AHRS/AP_AHRS.h

@ -388,8 +388,8 @@ public: @@ -388,8 +388,8 @@ public:
// return the amount of yaw angle change due to the last yaw angle reset in radians
// 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;
virtual uint32_t getLastYawResetAngle(float &yawAng) const {
return 0;
};
// return the amount of NE position change in metres due to the last reset

4
libraries/AP_AHRS/AP_AHRS_NavEKF.cpp

@ -729,7 +729,7 @@ const char *AP_AHRS_NavEKF::prearm_failure_reason(void) const @@ -729,7 +729,7 @@ 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 the time of the last yaw angle reset or 0 if no reset has ever occurred
uint32_t AP_AHRS_NavEKF::getLastYawResetAngle(float &yawAng)
uint32_t AP_AHRS_NavEKF::getLastYawResetAngle(float &yawAng) const
{
switch (ekf_type()) {
case 1:
@ -737,7 +737,7 @@ uint32_t AP_AHRS_NavEKF::getLastYawResetAngle(float &yawAng) @@ -737,7 +737,7 @@ uint32_t AP_AHRS_NavEKF::getLastYawResetAngle(float &yawAng)
case 2:
return EKF2.getLastYawResetAngle(yawAng);
}
return false;
return 0;
}
// return the amount of NE position change in metres due to the last reset

2
libraries/AP_AHRS/AP_AHRS_NavEKF.h

@ -165,7 +165,7 @@ public: @@ -165,7 +165,7 @@ public:
// return the amount of yaw angle change due to the last yaw angle reset in radians
// returns the time of the last yaw angle reset or 0 if no reset has ever occurred
uint32_t getLastYawResetAngle(float &yawAng);
uint32_t getLastYawResetAngle(float &yawAng) const;
// return the amount of NE position change in metres due to the last reset
// returns the time of the last reset or 0 if no reset has ever occurred

Loading…
Cancel
Save