AP_AHRS: added send_ekf_status_report()

This commit is contained in:
Andrew Tridgell 2015-09-29 10:58:54 +10:00
parent 7ba6f92eb5
commit 232fc8a64d
2 changed files with 16 additions and 0 deletions

View File

@ -709,5 +709,18 @@ bool AP_AHRS_NavEKF::resetHeightDatum(void)
return false;
}
// send a EKF_STATUS_REPORT for current EKF
void AP_AHRS_NavEKF::send_ekf_status_report(mavlink_channel_t chan)
{
switch (active_EKF_type()) {
case EKF_TYPE1:
default:
return EKF1.send_status_report(chan);
case EKF_TYPE2:
return EKF2.send_status_report(chan);
}
}
#endif // AP_AHRS_NAVEKF_AVAILABLE

View File

@ -152,6 +152,9 @@ public:
// Returns true if the height datum reset has been performed
// If using a range finder for height no reset is performed and it returns false
bool resetHeightDatum(void);
// send a EKF_STATUS_REPORT for current EKF
void send_ekf_status_report(mavlink_channel_t chan);
private:
enum EKF_TYPE {EKF_TYPE_NONE, EKF_TYPE1, EKF_TYPE2};