Browse Source

geofence: disable altitude check if not configured

It currently cannot be configured via mavlink mission protocol.
sbg
Beat Küng 8 years ago committed by Lorenz Meier
parent
commit
4c1328483d
  1. 6
      src/modules/navigator/geofence.cpp

6
src/modules/navigator/geofence.cpp

@ -260,8 +260,10 @@ bool Geofence::checkPolygons(double lat, double lon, float altitude)
} }
/* Vertical check */ /* Vertical check */
if (altitude > _altitude_max || altitude < _altitude_min) { if (_altitude_max > _altitude_min) { // only enable vertical check if configured properly
return false; if (altitude > _altitude_max || altitude < _altitude_min) {
return false;
}
} }
/* Horizontal check: iterate all polygons */ /* Horizontal check: iterate all polygons */

Loading…
Cancel
Save