From 409a7e1c97701e7adf9b1d86b30a64688620e680 Mon Sep 17 00:00:00 2001 From: Niti Rohilla Date: Tue, 26 Apr 2016 15:47:40 +0530 Subject: [PATCH] APMRover : Updated handle_guided_request() to report error. --- APMrover2/GCS_Mavlink.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/APMrover2/GCS_Mavlink.cpp b/APMrover2/GCS_Mavlink.cpp index ef108a4d06..ed774976c3 100644 --- a/APMrover2/GCS_Mavlink.cpp +++ b/APMrover2/GCS_Mavlink.cpp @@ -835,11 +835,11 @@ GCS_MAVLINK::data_stream_send(void) -void GCS_MAVLINK::handle_guided_request(AP_Mission::Mission_Command &cmd) +bool GCS_MAVLINK::handle_guided_request(AP_Mission::Mission_Command &cmd) { if (rover.control_mode != GUIDED) { // only accept position updates when in GUIDED mode - return; + return false; } rover.guided_WP = cmd.content.location; @@ -847,6 +847,7 @@ void GCS_MAVLINK::handle_guided_request(AP_Mission::Mission_Command &cmd) // make any new wp uploaded instant (in case we are already in Guided mode) rover.rtl_complete = false; rover.set_guided_WP(); + return true; } void GCS_MAVLINK::handle_change_alt_request(AP_Mission::Mission_Command &cmd)