Skip to content
Snippets Groups Projects
Commit c381222a authored by Olivier-ADLER's avatar Olivier-ADLER Committed by Randy Mackay
Browse files

Copter: Fence missing GPS 3D fix check

Fence was missing GPS 3D fix check before selecting recovery decision.
parent a2c3bc05
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ void fence_check() ...@@ -36,7 +36,7 @@ void fence_check()
init_disarm_motors(); init_disarm_motors();
}else{ }else{
// if we have a GPS // 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 we are within 100m of the fence, RTL
if( fence.get_breach_distance(new_breaches) <= AC_FENCE_GIVE_UP_DISTANCE) { if( fence.get_breach_distance(new_breaches) <= AC_FENCE_GIVE_UP_DISTANCE) {
if(control_mode != RTL) { if(control_mode != RTL) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment