Make MAVProxy a pymavlink MAVFTP wrapper - #1762
amilcarlucas wants to merge 1 commit into
Conversation
Replace MAVProxy's forked FTP protocol implementation with an FTPWorker adapter around pymavlink.mavftp.MAVFTP. Keep MAVProxy-specific responsibilities in FTPModule: concurrent session allocation and quarantine, queued operation scheduling, target snapshotting and reply routing, shared MAVLink batching and link simulation, plus console output and callback compatibility. Delegate FTP packet construction, transfer state machines, retries, directory parsing, CRC handling, and file operations to pymavlink. Use pymavlink's managed transport API so each worker has an explicit session, does not reset vehicle sessions, sends raw payloads through MAVProxy's shared transport, and completes asynchronously without blocking MAVProxy's event loop. Preserve module-level protocol/error aliases for existing MAVProxy callers. Add coverage for event-loop-driven CRC comparisons and correct synthetic download replies to use the protocol-valid request sequence number.
8856f76 to
d37f0b1
Compare
|
This will require releasing an pymavlink 2.4.50 and updating the dependencies to depend on it. |
|
Automated review note — AI-generated (Claude), validated against the live diff. Please sanity-check before acting. Full report: https://uav.tridgell.net/DevCallReviews/2026_09_23/devcall_pr_reviews.html#prMAVProxy-1762 Reviewed at head 1. The module cannot import against any released pymavlink — and CI says so
This is not niche: and One correction to the dependency picture, since it changes the ordering: pymavlink #1274 and #1288 are not siblings — So the order is: merge #1274 → merge #1288 → release pymavlink 2.4.50 → in this PR, bump 2. Essentially all FTP console output is silently lostpymavlink's mavftp reports through Worse, remote NACKs never even reach Measured side by side on the same scripted session, old module vs new:
The clean fix belongs in #1288 — give 3.
|
tridge
left a comment
There was a problem hiding this comment.
no thanks, I deliberately want to keep them separate
Replace MAVProxy's forked FTP protocol implementation with an FTPWorker adapter around pymavlink.mavftp.MAVFTP.
Keep MAVProxy-specific responsibilities in FTPModule: concurrent session allocation and quarantine, queued operation scheduling, target snapshotting and reply routing, shared MAVLink batching and link simulation, plus console output and callback compatibility. Delegate FTP packet construction, transfer state machines, retries, directory parsing, CRC handling, and file operations to pymavlink.
Use pymavlink's managed transport API so each worker has an explicit session, does not reset vehicle sessions, sends raw payloads through MAVProxy's shared transport, and completes asynchronously without blocking MAVProxy's event loop. Preserve module-level protocol/error aliases for existing MAVProxy callers.
Add coverage for event-loop-driven CRC comparisons and correct synthetic download replies to use the protocol-valid request sequence number.
requires http://github.com/ArduPilot/pymavlink/pull/1288