From 52d81f630fa313db5fab541631a7574e4612a673 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Thu, 23 Jun 2016 15:24:58 +0900 Subject: [PATCH] Copter: pass polygon fence mavlink messages to fence --- ArduCopter/GCS_Mavlink.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ArduCopter/GCS_Mavlink.cpp b/ArduCopter/GCS_Mavlink.cpp index f81983d8c5..8eef0c71c7 100644 --- a/ArduCopter/GCS_Mavlink.cpp +++ b/ArduCopter/GCS_Mavlink.cpp @@ -1944,6 +1944,14 @@ void GCS_MAVLINK_Copter::handleMessage(mavlink_message_t* msg) break; #endif +#if AC_FENCE == ENABLED + // send or receive fence points with GCS + case MAVLINK_MSG_ID_FENCE_POINT: // MAV ID: 160 + case MAVLINK_MSG_ID_FENCE_FETCH_POINT: + copter.fence.handle_msg(chan, msg); + break; +#endif // AC_FENCE == ENABLED + #if CAMERA == ENABLED //deprecated. Use MAV_CMD_DO_DIGICAM_CONFIGURE case MAVLINK_MSG_ID_DIGICAM_CONFIGURE: // MAV ID: 202