Copter: Fence missing GPS 3D fix check

Fence was missing GPS 3D fix check before selecting recovery decision.
This commit is contained in:
Olivier-ADLER 2013-06-16 00:48:48 +02:00 committed by Randy Mackay
parent facd8fc89f
commit 24e1f074d0

View File

@ -36,7 +36,7 @@ void fence_check()
init_disarm_motors();
}else{
// if we have a GPS
if( ap.home_is_set ) {
if( ap.home_is_set && g_gps->status() == GPS::GPS_OK_FIX_3D ) {
// if we are within 100m of the fence, RTL
if( fence.get_breach_distance(new_breaches) <= AC_FENCE_GIVE_UP_DISTANCE) {
if(control_mode != RTL) {