From a03941ba02803b54cf8440c11c028e35f595e034 Mon Sep 17 00:00:00 2001 From: Niti Rohilla Date: Tue, 26 Apr 2016 15:47:02 +0530 Subject: [PATCH] ArduPlane : Updated handle_guided_request() to report error. --- ArduPlane/GCS_Mavlink.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ArduPlane/GCS_Mavlink.cpp b/ArduPlane/GCS_Mavlink.cpp index 0dfb69affc..e51d019dc1 100644 --- a/ArduPlane/GCS_Mavlink.cpp +++ b/ArduPlane/GCS_Mavlink.cpp @@ -1104,11 +1104,11 @@ GCS_MAVLINK::data_stream_send(void) handle a request to switch to guided mode. This happens via a callback from handle_mission_item() */ -void GCS_MAVLINK::handle_guided_request(AP_Mission::Mission_Command &cmd) +bool GCS_MAVLINK::handle_guided_request(AP_Mission::Mission_Command &cmd) { if (plane.control_mode != GUIDED) { // only accept position updates when in GUIDED mode - return; + return false; } plane.guided_WP_loc = cmd.content.location; @@ -1119,6 +1119,7 @@ void GCS_MAVLINK::handle_guided_request(AP_Mission::Mission_Command &cmd) } plane.set_guided_WP(); + return true; } /*