From 727d42be1cb219c6f0026728653753f0fb40d7a6 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 4 Feb 2019 11:07:56 +1100 Subject: [PATCH] Copter: move handling of MAV_CMD_DO_SET_FENCE_ENABLED up This has the effect of losing the statustext messages. We should not be sending statustext messages for things that complete successfully, and this data is available in the fence_status mavlink message (and in SYS_STATUS too) --- ArduCopter/GCS_Mavlink.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/ArduCopter/GCS_Mavlink.cpp b/ArduCopter/GCS_Mavlink.cpp index d1bd9138ff..4efa7821cc 100644 --- a/ArduCopter/GCS_Mavlink.cpp +++ b/ArduCopter/GCS_Mavlink.cpp @@ -780,20 +780,6 @@ MAV_RESULT GCS_MAVLINK_Copter::handle_command_long_packet(const mavlink_command_ } return MAV_RESULT_FAILED; -#if AC_FENCE == ENABLED - case MAV_CMD_DO_FENCE_ENABLE: - switch ((uint16_t)packet.param1) { - case 0: - copter.fence.enable(false); - return MAV_RESULT_ACCEPTED; - case 1: - copter.fence.enable(true); - return MAV_RESULT_ACCEPTED; - default: - return MAV_RESULT_FAILED; - } -#endif - #if PARACHUTE == ENABLED case MAV_CMD_DO_PARACHUTE: // configure or release parachute