From 564ff3a46830938f246bc9c1719a7c9b77296ba1 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 3 Apr 2017 13:32:12 +1000 Subject: [PATCH] GCS_MAVLink: always allow HOME to be read by MISSION_REQUEST Fixes #5980 --- libraries/GCS_MAVLink/GCS_Common.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index aa6191cd65..4cdbdebf8b 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -337,7 +337,8 @@ void GCS_MAVLINK::handle_mission_request(AP_Mission &mission, mavlink_message_t mavlink_mission_request_t packet; mavlink_msg_mission_request_decode(msg, &packet); - if (packet.seq >= mission.num_commands()) { + if (packet.seq != 0 && // always allow HOME to be read + packet.seq >= mission.num_commands()) { // try to educate the GCS on the actual size of the mission: mavlink_msg_mission_count_send(chan,msg->sysid, msg->compid, mission.num_commands()); goto mission_item_send_failed;