Browse Source

AP_AHRS_NavEKF: reflect changes to getMagOffsets

mission-4.1.18
Jonathan Challinger 9 years ago committed by Andrew Tridgell
parent
commit
6a5f1c0bec
  1. 6
      libraries/AP_AHRS/AP_AHRS_NavEKF.cpp
  2. 2
      libraries/AP_AHRS/AP_AHRS_NavEKF.h

6
libraries/AP_AHRS/AP_AHRS_NavEKF.cpp

@ -981,16 +981,16 @@ void AP_AHRS_NavEKF::getEkfControlLimits(float &ekfGndSpdLimit, float &ekfNavVel @@ -981,16 +981,16 @@ void AP_AHRS_NavEKF::getEkfControlLimits(float &ekfGndSpdLimit, float &ekfNavVel
// get compass offset estimates
// true if offsets are valid
bool AP_AHRS_NavEKF::getMagOffsets(Vector3f &magOffsets)
bool AP_AHRS_NavEKF::getMagOffsets(uint8_t mag_idx, Vector3f &magOffsets)
{
switch (ekf_type()) {
case 0:
case 1:
return EKF1.getMagOffsets(magOffsets);
return EKF1.getMagOffsets(mag_idx, magOffsets);
case 2:
default:
return EKF2.getMagOffsets(magOffsets);
return EKF2.getMagOffsets(mag_idx, magOffsets);
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
case EKF_TYPE_SITL:

2
libraries/AP_AHRS/AP_AHRS_NavEKF.h

@ -164,7 +164,7 @@ public: @@ -164,7 +164,7 @@ public:
// get compass offset estimates
// true if offsets are valid
bool getMagOffsets(Vector3f &magOffsets);
bool getMagOffsets(uint8_t mag_idx, Vector3f &magOffsets);
// report any reason for why the backend is refusing to initialise
const char *prearm_failure_reason(void) const override;

Loading…
Cancel
Save