fix(mavlink): guard mission download completion (#27412)

Only apply the missing-ACK recovery while in SENDLIST.
This commit is contained in:
Eurus
2026-05-21 05:25:42 +08:00
committed by GitHub
parent 54cf213c7e
commit 72136d0b47
+2 -2
View File
@@ -736,9 +736,9 @@ MavlinkMissionManager::handle_mission_request_list(const mavlink_message_t *msg)
mavlink_msg_mission_request_list_decode(msg, &wprl);
if (CHECK_SYSID_COMPID_MISSION(wprl)) {
const bool maybe_completed = (_transfer_seq == current_item_count());
const bool maybe_completed = (_state == MAVLINK_WPM_STATE_SENDLIST) && (_transfer_seq == current_item_count());
// If all mission items have been sent and a new mission request list comes in, we can proceed even if MISSION_ACK was
// If all mission items have been sent and a new mission request list comes in, we can proceed even if MISSION_ACK was
// never received. This could happen on a quick reconnect that doesn't trigger MAVLINK_MISSION_PROTOCOL_TIMEOUT_DEFAULT
if (maybe_completed) {
switch_to_idle_state();