Skip to content

Commit

Permalink
Plane: output user-friendly fence messages
Browse files Browse the repository at this point in the history
  • Loading branch information
andyp1per committed Jan 19, 2024
1 parent fce8014 commit 7b48abe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ArduPlane/fence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ void Plane::fence_check()
}

if (new_breaches) {
GCS_SEND_TEXT(MAV_SEVERITY_NOTICE, "Fence Breached");
char msg[MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN+1];
uint8_t msglen = AC_Fence::get_fence_names(new_breaches, msg, MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN);
msg[msglen] = 0;

GCS_SEND_TEXT(MAV_SEVERITY_NOTICE, "%s breached", msg);

// if the user wants some kind of response and motors are armed
const uint8_t fence_act = fence.get_action();
Expand Down

0 comments on commit 7b48abe

Please sign in to comment.