mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 00:30:50 +08:00
fix(mavlink): ignore foreign mission counts for upload timeout (#29537)
Only the active upload partner may refresh the protocol receive timeout. Assisted-by: ChatGPT:gpt-6
This commit is contained in:
1 parent
cca69f2a5d
commit
483f73d19d
1 file changed
+2
-2
@@ -1037,8 +1037,6 @@ MavlinkMissionManager::handle_mission_count(const mavlink_message_t *msg)
|
||||
_transfer_land_marker = -1;
|
||||
|
||||
} else if (_state == MAVLINK_WPM_STATE_GETLIST) {
|
||||
_time_last_recv = hrt_absolute_time();
|
||||
|
||||
if (msg->sysid != _transfer_partner_sysid || msg->compid != _transfer_partner_compid) {
|
||||
PX4_DEBUG("WPM: Request from another partner while receiveing. Ignore");
|
||||
|
||||
@@ -1046,6 +1044,8 @@ MavlinkMissionManager::handle_mission_count(const mavlink_message_t *msg)
|
||||
return;
|
||||
}
|
||||
|
||||
_time_last_recv = hrt_absolute_time();
|
||||
|
||||
if (_transfer_seq == 0) {
|
||||
/* looks like our MISSION_REQUEST was lost, try again */
|
||||
PX4_DEBUG("WPM: MISSION_COUNT %u from ID %" PRIu32 " (again)", wpc.count, msg->sysid);
|
||||
|
||||
Reference in new issue
Block a user