mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
geofence: disable altitude check if not configured
It currently cannot be configured via mavlink mission protocol.
This commit is contained in:
parent
2981ece921
commit
4c1328483d
@ -260,8 +260,10 @@ bool Geofence::checkPolygons(double lat, double lon, float altitude)
|
||||
}
|
||||
|
||||
/* Vertical check */
|
||||
if (altitude > _altitude_max || altitude < _altitude_min) {
|
||||
return false;
|
||||
if (_altitude_max > _altitude_min) { // only enable vertical check if configured properly
|
||||
if (altitude > _altitude_max || altitude < _altitude_min) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* Horizontal check: iterate all polygons */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user