From 45ba43ee1c829d045e6746486b6ead8990db681c Mon Sep 17 00:00:00 2001 From: Balduin Date: Thu, 7 May 2026 17:21:00 +0200 Subject: [PATCH] update call sites --- .../GeofenceBreachAvoidance/GeofenceAvoidancePlannerTest.cpp | 3 ++- src/modules/navigator/geofence.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/navigator/GeofenceBreachAvoidance/GeofenceAvoidancePlannerTest.cpp b/src/modules/navigator/GeofenceBreachAvoidance/GeofenceAvoidancePlannerTest.cpp index 6a165b1837..4c0ca0c426 100644 --- a/src/modules/navigator/GeofenceBreachAvoidance/GeofenceAvoidancePlannerTest.cpp +++ b/src/modules/navigator/GeofenceBreachAvoidance/GeofenceAvoidancePlannerTest.cpp @@ -55,8 +55,9 @@ public: vertices_local[i] = ref.project(_vertices[i](0), _vertices[i](1)); } + const bool is_inclusion_zone = (_fence_type == NAV_CMD_FENCE_POLYGON_VERTEX_INCLUSION); return geofence_utils::lineSegmentIntersectsPolygon(start_local, end_local, - vertices_local, _num_vertices); + vertices_local, _num_vertices, is_inclusion_zone); } PolygonInfo getPolygonInfoByIndex(int index) override diff --git a/src/modules/navigator/geofence.cpp b/src/modules/navigator/geofence.cpp index f1a5e15204..aaf47835ee 100644 --- a/src/modules/navigator/geofence.cpp +++ b/src/modules/navigator/geofence.cpp @@ -759,8 +759,10 @@ bool Geofence::checkIfLineViolatesAnyFence(const matrix::Vector2f &start_local, continue; } + const bool is_inclusion_zone = (info.fence_type == NAV_CMD_FENCE_POLYGON_VERTEX_INCLUSION); + if (geofence_utils::lineSegmentIntersectsPolygon( - start_local, end_local, vertices_local, info.vertex_count)) { + start_local, end_local, vertices_local, info.vertex_count, is_inclusion_zone)) { return true; }