5
0
mirror of https://github.com/ArduPilot/ardupilot synced 2025-02-27 10:13:57 -04:00

AC_Avoidance: Dijkstra's ignores invalid polygon fences

This commit is contained in:
Randy Mackay 2019-07-07 07:23:24 +09:00 committed by Tom Pittenger
parent 614b0f6dc8
commit 655ddd4ab3

View File

@ -122,6 +122,9 @@ bool AP_OADijkstra::polygon_fence_enabled() const
if (fence == nullptr) {
return false;
}
if (!fence->is_polygon_valid()) {
return false;
}
return ((fence->get_enabled_fences() & AC_FENCE_TYPE_POLYGON) > 0);
}