AP_AHRS: fixed EKF type 10

This commit is contained in:
Andrew Tridgell 2016-12-21 10:52:12 +11:00
parent 372837b959
commit 22fd2025de
1 changed files with 5 additions and 0 deletions

View File

@ -740,6 +740,11 @@ bool AP_AHRS_NavEKF::get_relative_position_D(float &posD) const
uint8_t AP_AHRS_NavEKF::ekf_type(void) const
{
uint8_t type = _ekf_type;
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
if (type == EKF_TYPE_SITL) {
return type;
}
#endif
if ((always_use_EKF() && (type == 0)) || (type == 1) || (type > 3)) {
type = 2;
}