mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AC_Avoidance: Dijkstra's ignores invalid polygon fences
This commit is contained in:
parent
614b0f6dc8
commit
655ddd4ab3
@ -122,6 +122,9 @@ bool AP_OADijkstra::polygon_fence_enabled() const
|
|||||||
if (fence == nullptr) {
|
if (fence == nullptr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!fence->is_polygon_valid()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return ((fence->get_enabled_fences() & AC_FENCE_TYPE_POLYGON) > 0);
|
return ((fence->get_enabled_fences() & AC_FENCE_TYPE_POLYGON) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user