mirror of https://github.com/ArduPilot/ardupilot
AC_Fence: correct fence pre-arm position check
This commit is contained in:
parent
26fd334882
commit
c04d2145a1
|
@ -166,7 +166,7 @@ bool AC_Fence::pre_arm_check(const char* &fail_msg) const
|
||||||
if ((_enabled_fences & AC_FENCE_TYPE_CIRCLE) ||
|
if ((_enabled_fences & AC_FENCE_TYPE_CIRCLE) ||
|
||||||
(_enabled_fences & AC_FENCE_TYPE_POLYGON)) {
|
(_enabled_fences & AC_FENCE_TYPE_POLYGON)) {
|
||||||
Vector2f position;
|
Vector2f position;
|
||||||
if (AP::ahrs().get_relative_position_NE_home(position)) {
|
if (!AP::ahrs().get_relative_position_NE_home(position)) {
|
||||||
fail_msg = "fence requires position";
|
fail_msg = "fence requires position";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue