AC_Fence: fix prearm check

before arming the EKF's pred_horiz_pos_abs flag should be used
This commit is contained in:
Randy Mackay 2015-03-18 21:14:35 +09:00
parent 522ef8f91f
commit 9aba885231
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ bool AC_Fence::pre_arm_check() const
}
// if we have horizontal limits enabled, check inertial nav position is ok
if ((_enabled_fences & AC_FENCE_TYPE_CIRCLE)!=0 && !_inav->get_filter_status().flags.horiz_pos_abs) {
if ((_enabled_fences & AC_FENCE_TYPE_CIRCLE)!=0 && !_inav->get_filter_status().flags.horiz_pos_abs && !_inav->get_filter_status().flags.pred_horiz_pos_abs) {
return false;
}