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.
This commit is contained in:
Tim Tuxworth 2022-03-09 23:55:57 -08:00 committed by Andrew Tridgell
parent a79ad5489c
commit 21ec47f184
1 changed files with 4 additions and 0 deletions

View File

@ -51,6 +51,10 @@ void Plane::fence_check()
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
const uint8_t fence_act = fence.get_action();