Skip to content

Add MAVFTP parameter and mission support#1332

Draft
RyanCraighead wants to merge 1 commit into
ArduPilot:masterfrom
RyanCraighead:codex/mavftp-clean
Draft

Add MAVFTP parameter and mission support#1332
RyanCraighead wants to merge 1 commit into
ArduPilot:masterfrom
RyanCraighead:codex/mavftp-clean

Conversation

@RyanCraighead

@RyanCraighead RyanCraighead commented May 12, 2026

Copy link
Copy Markdown

Summary

  • Adds a MAVLink FTP manager for ArduPilot virtual file transfers over FILE_TRANSFER_PROTOCOL.
  • Downloads ArduPilot parameters via @PARAM/param.pck?withdefaults=1 and parses the packed parameter file into the existing parameter update path.
  • Uploads locally changed ArduPilot parameters via @PARAM/param.pck from the existing Write (ROM) path, matching ArduPilot's save-on-close behavior for parameter FTP uploads.
  • Downloads/uploads missions via @MISSION/mission.dat using ArduPilot's MISSION_ITEM_INT file format.
  • Falls back to existing MAVLink parameter and mission protocols when MAVFTP is unavailable, times out, or returns invalid data.
  • Registers the new source/header files in both qmake and CMake build lists.
  • Adds focused CMake unit coverage for the MAVFTP parameter file, mission file, and FTP payload helpers.

Validation

  • Ran git diff --check origin/master..HEAD.
  • Added and ran mavftp_unit_tests covering packed parameter parsing, parameter upload encoding, mission.dat parsing/writing, malformed file rejection, MAVFTP opcodes/offsets, ACK/NAK/EOF handling, sequence wrap, and payload-size limits.
  • Checked the implementation against current ArduPilot @PARAM/param.pck, @MISSION/mission.dat, and MAVFTP response handling.
  • Confirmed Linux qmake build, CMake/Ninja build, and ctest passed on the fork validation branch: https://github.com/RyanCraighead/apm_planner/actions/runs/25715278364. The final PR branch excludes the temporary validation workflow.
  • Ran local CMake configure with Visual Studio; it stops at Qt5 discovery because Qt5 is not installed on this machine.

Relates #1252

Transparent note: this implementation was assisted by OpenAI Codex.

Adds a MAVFTP client for ArduPilot virtual file transfers.

Downloads packed parameters, uploads changed parameters through @PARAM/param.pck from the existing Write path, and uploads/downloads missions through @MISSION/mission.dat, with fallback to existing MAVLink protocols.

Adds focused CMake unit coverage for packed parameter files, parameter upload encoding, mission.dat files, and MAVFTP request/response payloads.

Relates ArduPilot#1252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant