Repository navigation
Add editor MAVFTP transfers and filtering; fix console shutdown - #1766
Conversation
Default both editors to MAVFTP for reads and writes, uploading only changed parameters and reporting transfer results in the UI. Keep pending edits on failure and mark missions synced only after successful transfers. Pass vehicle defaults into the parameter editor so the Non Default filter stays current as parameters and defaults change.
The console previously returned after a two-second close timeout, leaving Python to wait indefinitely for a surviving GUI child. Terminate and, if necessary, kill and reap that child so Ctrl-C can finish shutdown even when it ignores SIGTERM. Close the parent pipes and ignore late writes after cleanup. Cover both cooperative and unresponsive children, including a real MAVProxy SIGINT shutdown.
Previous review (2026-10-02)Automated review note — AI-generated (Claude), validated against the live diff. Please sanity-check before acting. Reviewed at head Thanks, the console shutdown fix and the editor MAVFTP support look good. The shutdown regression tests fail on the base and pass here, and the stricter mission download validation is a nice improvement. One thing needs changing before merge. wp_ftp_upload now uploads the current loader when args is empty, but it is also the handler for Smaller items, none blocking:
|
Wait for the FTP close acknowledgement and verify only uploaded parameter names with targeted MAVLink reads, so rejected writes remain pending without refetching all parameters. Submit editor FTP operations on the main loop and discard stale vehicle results while preserving mission edits made during downloads. Require a filename for CLI mission uploads to prevent accidental uploads of cached or empty missions.
Limit the parameter editor MAVFTP checkbox to Fetch all and restore Write to PARAM_SET. Remove the new parameter FTP upload API and verification reads so changing a few parameters requires no extra fetch; FTP writes of changed parameters are deferred to a future PR.
Assigning mpstate before starting a bound child target caused spawn and forkserver to serialize live MAVProxy state, including closed connections. Use a static GUI entry point with explicit queues and configuration, and initialize the stop flag before starting worker threads. Cover empty-mission startup with closed parent handles on spawn, forkserver and fork.
|
Automated review note — AI-generated (Claude), validated against the live diff. Please sanity-check before acting. Reviewed at head Thanks for the update. This follow-up covers commit 50b6806; the PR has since moved to 996623a, which I haven't reviewed. The earlier blocker is fixed: a bare Remaining suggestions, none blocking:
SITL, real hardware and a displayed GUI were not exercised. Head moved during review: observed |
Add enabled-by-default MAVFTP tickboxes to the mission and parameter editors. Read WPs and Write WPs use FTP when checked; Fetch all in the parameter editor also follows its checkbox. Parameter Write always uses PARAM_SET for edited values, without verification reads or a full refetch. FTP writes of changed parameters are deferred to a future PR.
Both editors show MAVFTP transfer status and completion results. Transfers start on the MAVProxy main loop, results from a previously selected vehicle are discarded, and mission downloads preserve edits made during the transfer. FTP uploads wait for the close acknowledgement before reporting success. CLI mission FTP uploads still require a filename.
Add a Non Default parameter filter using defaults reported by the selected vehicle. It combines with text search and refreshes as parameter values or defaults change. When defaults are unavailable, the editor explains how to fetch them.
Also fix console shutdown: after the close timeout, terminate and reap an unresponsive GUI child, escalating to kill if it ignores SIGTERM. Previously the child could keep Python waiting indefinitely after Ctrl-C.
Mission editor startup now passes only GUI queues and configuration to the child process, avoiding serialization of closed MAVProxy handles with Python 3.14 forkserver or spawn.
Validation: