ParameterEditor: support Mission Planner .param file import in diff dialog#14451
ParameterEditor: support Mission Planner .param file import in diff dialog#14451DonLakeFlyer wants to merge 1 commit into
Conversation
…ialog The parameter diff dialog previously only parsed tab-delimited QGC .params files. Mission Planner exports space-delimited .param files using the same 5-column format (VehicleId ComponentId Name Value Type), so valid files were silently rejected — parsedLineCount stayed 0 and the function returned false with no user-visible message. Changes: - buildDiffFromFile: split on /[\t ]+/ instead of '\t' so both formats are accepted. Trim each line before splitting to avoid empty leading fields. Add parsedLineCount guard: show an explicit error and return false when no 5-column lines are found (bad file format). - Remove dead ParameterManager::readParametersFromStream (declaration and implementation) — had no callers since the UI moved to buildDiffFromFile. - ParameterEditor.qml: add 'Mission Planner Files (*.param)' filter to the load file dialog alongside the existing QGC filter. - Add ParameterEditorControllerTest covering QGC format, MP format, no-diff (both formats), bad format, and unknown parameter. Fixes mavlink#14347
There was a problem hiding this comment.
Pull request overview
Extends the parameter diff loader to accept Mission Planner whitespace-delimited .param files (in addition to QGC tab-delimited .params), surfaces an explicit error when no parameter rows are parsed, adds the new filter to the load dialog, removes dead code in ParameterManager, and adds integration tests covering the new behavior.
Changes:
buildDiffFromFilenow splits on[\t ]+after trimming, tracksparsedLineCount, and shows a user-facing message when nothing parses.ParameterEditor.qmladds the Mission Planner Files (.param)* name filter and the unusedreadParametersFromStreamis removed fromParameterManager.- New
ParameterEditorControllerTestexercises QGC/MP formats (with and without diffs), bad-format handling, and unknown-on-vehicle params.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/QmlControls/ParameterEditorController.cc | Whitespace-tolerant split, parsed-line counter, and "no valid parameters" user message |
| src/QmlControls/ParameterEditor.qml | Adds MP .param filter to the load file dialog |
| src/FactSystem/ParameterManager.h | Removes declaration of dead readParametersFromStream |
| src/FactSystem/ParameterManager.cc | Removes implementation of dead readParametersFromStream |
| test/FactSystem/ParameterEditorControllerTest.{h,cc} | New integration tests for the diff loader (QGC/MP, no-diff, bad format, unknown param) |
| test/FactSystem/CMakeLists.txt | Adds new test sources |
| test/CMakeLists.txt | Registers ParameterEditorControllerTest with Integration/Vehicle/MockLink labels |
| docs/en/qgc-user-guide/getting_started/whats_new.md | Documents the new MP .param import capability |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14451 +/- ##
==========================================
+ Coverage 25.47% 28.00% +2.53%
==========================================
Files 769 767 -2
Lines 65912 66331 +419
Branches 30495 30640 +145
==========================================
+ Hits 16788 18578 +1790
+ Misses 37285 34930 -2355
- Partials 11839 12823 +984
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 200 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Build ResultsPlatform Status
All builds passed. Pre-commit
Pre-commit hooks: 2 passed, 45 failed, 7 skipped. Test Resultslinux-coverage: 90 passed, 0 skipped Code Coverage
Artifact Sizes
Updated: 2026-05-31 20:37:05 UTC • Triggered by: Linux |
Fixes #14347
Summary
The parameter diff dialog accepted only QGC tab-delimited
.paramsfiles. Mission Planner exports space-delimited.paramfiles using the identical 5-column format (VehicleId ComponentId Name Value Type), so valid MP files were silently rejected —parsedLineCountstayed 0 andbuildDiffFromFilereturnedfalsewith no user feedback.Changes
ParameterEditorController.cc—buildDiffFromFile/[\t ]+/(was\tonly) so both QGC and MP column separators are handled.parsedLineCountguard: when no 5-column lines are found, show an explicit user message ("No valid parameters found…") and returnfalseinstead of silently returningtruewith an empty diff list.ParameterManager.h/ParameterManager.ccreadParametersFromStream(declaration + implementation). It had no callers; the UI has usedbuildDiffFromFileexclusively since the diff dialog was introduced.ParameterEditor.qmlTests —
ParameterEditorControllerTest