From 6e915df31b13fe48827d0c2bff93d4aa7ffdc7a6 Mon Sep 17 00:00:00 2001 From: Tim Tuxworth Date: Wed, 9 Mar 2022 23:55:57 -0800 Subject: [PATCH] Plane: Display Fence Breach message in GCS Send a "Geofence breach" message to the Ground Control Station. Without this when the fence is breached and if anything happens as a result, such as RTL, it will happen silently. --- ArduPlane/fence.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArduPlane/fence.cpp b/ArduPlane/fence.cpp index df2b69c09c..d22a50bb75 100644 --- a/ArduPlane/fence.cpp +++ b/ArduPlane/fence.cpp @@ -50,6 +50,10 @@ void Plane::fence_check() // user disables/re-enables using the fence channel switch return; } + + if(new_breaches && plane.is_flying()) { + GCS_SEND_TEXT(MAV_SEVERITY_NOTICE, "Fence Breached"); + } if (new_breaches || orig_breaches) { // if the user wants some kind of response and motors are armed