AC_Fence: require home as well as origin for prearm checks

This commit is contained in:
Peter Barker 2017-12-12 16:50:03 +11:00 committed by Randy Mackay
parent 7222380598
commit e8151a7ec1
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ bool AC_Fence::pre_arm_check(const char* &fail_msg) const
if ((_enabled_fences & AC_FENCE_TYPE_CIRCLE) ||
(_enabled_fences & AC_FENCE_TYPE_POLYGON)) {
Vector2f position;
if (!_ahrs.get_relative_position_NE_origin(position)) {
if (!_ahrs.get_relative_position_NE_home(position)) {
fail_msg = "fence requires position";
return false;
}