mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 00:31:36 +08:00
fix(mavlink): guard mission download completion (#27412)
Only apply the missing-ACK recovery while in SENDLIST.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user