From 4945d66c800d6d64359019c30121fa5e68e020e8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 28 Aug 2012 11:59:28 +1000 Subject: [PATCH] APM: check for geofence fence total of 0 --- ArduPlane/geofence.pde | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArduPlane/geofence.pde b/ArduPlane/geofence.pde index 7e9d4e7e34..e7bc0e8c63 100644 --- a/ArduPlane/geofence.pde +++ b/ArduPlane/geofence.pde @@ -89,8 +89,9 @@ static void geofence_load(void) } } - if (g.fence_total < 0) { + if (g.fence_total <= 0) { g.fence_total.set(0); + return; } for (i=0; i