Skip to content

bugfix: ftp reads return empty#2179

Merged
vooon merged 1 commit intomavlink:ros2from
tonygoldman:bugfix/ftp_read
Apr 4, 2026
Merged

bugfix: ftp reads return empty#2179
vooon merged 1 commit intomavlink:ros2from
tonygoldman:bugfix/ftp_read

Conversation

@tonygoldman
Copy link
Copy Markdown

@tonygoldman tonygoldman commented Apr 3, 2026

Fixes #1928

Recent versions of PX4 and ArduCopter read payload->size bytes instead of kMaxDataLength.
Mavros was sending size = 0, causing all reads to return empty.

  • Set req.header()->size to the actual bytes requested
  • Guard the read loop against a redundant trailing request when read_size is an exact multiple of DATA_MAXSZ

@tonygoldman tonygoldman changed the title bugfix: ftp_read bugfix: ftp reads return empty Apr 3, 2026
@vooon vooon added this to the Version 2.15 milestone Apr 3, 2026
Copy link
Copy Markdown
Member

@vooon vooon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@vooon vooon merged commit 39993c0 into mavlink:ros2 Apr 4, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MAVROS FTP read from PX4 1.14.1 always return 0 length data.

2 participants