From 69e8fed623dcaf0aeaf5e0123bb517629a05da07 Mon Sep 17 00:00:00 2001 From: Davide Passoni Date: Thu, 20 Mar 2025 16:53:23 +0100 Subject: [PATCH] fix: Scenic AAA not stopping when target out of range --- backend/core/src/groundunit.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/core/src/groundunit.cpp b/backend/core/src/groundunit.cpp index 74d6272d..5206c5bf 100644 --- a/backend/core/src/groundunit.cpp +++ b/backend/core/src/groundunit.cpp @@ -398,6 +398,9 @@ void GroundUnit::AIloop() taskString += "Scenic AAA. No valid target."; else taskString += "Scenic AAA. Target outside max range: " + to_string((int)round(distance)) + "m."; + + if (getHasTask()) + resetTask(); } } }