From 96fc68ebef6e10ac5cf0fdcc93f7439151f24e98 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Wed, 27 Nov 2019 11:11:34 +0100 Subject: [PATCH] mavlink: fix warning on do jump This fixes the warning: Mission storage: Unable to read from microSD which appeared on do jump mission items. The reason was that the _mission_type can be set to rally or geofence if that was the last transfer which had happened earlier. Therefore, it would then try to read a certain rally item from dataman when really a mission item was supposed to be read. --- src/modules/mavlink/mavlink_mission.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/mavlink/mavlink_mission.cpp b/src/modules/mavlink/mavlink_mission.cpp index 12ba2f6b53..a209ba9d81 100644 --- a/src/modules/mavlink/mavlink_mission.cpp +++ b/src/modules/mavlink/mavlink_mission.cpp @@ -499,6 +499,7 @@ MavlinkMissionManager::send(const hrt_abstime now) if (mission_result.item_do_jump_changed) { /* send a mission item again if the remaining DO_JUMPs has changed */ + _mission_type = MAV_MISSION_TYPE_MISSION; send_mission_item(_transfer_partner_sysid, _transfer_partner_compid, (uint16_t)mission_result.item_changed_index); }