Copter: only check hdop when circular fence enabled

This commit is contained in:
Randy Mackay 2013-08-15 16:03:57 +09:00
parent b40cd07ce9
commit 34e874282e
1 changed files with 1 additions and 1 deletions

View File

@ -293,7 +293,7 @@ static void pre_arm_checks(bool display_failure)
#if AC_FENCE == ENABLED
// check fence is initialised
if(!fence.pre_arm_check() || (fence.enabled() && g_gps->hdop > g.gps_hdop_good)) {
if(!fence.pre_arm_check() || (((fence.get_enabled_fences() & AC_FENCE_TYPE_CIRCLE) != 0) && g_gps->hdop > g.gps_hdop_good)) {
if (display_failure) {
gcs_send_text_P(SEVERITY_HIGH,PSTR("PreArm: Bad GPS Pos"));
}