Add PARAM_EXT to parameter tab - #15030
Open
julianoes wants to merge 2 commits into
Open
Conversation
QGCCameraParamIO carried its own switch statements for encoding and decoding the 128 byte PARAM_EXT value blob. ParameterManager needs the same conversion for the extended parameter protocol, so move it to QGCMAVLink rather than duplicate it. The encode path previously used std::max where std::min was meant, reading past the end of a CUSTOM value shorter than 128 bytes.
Extended parameters were only reachable through the camera definition file, which means a camera's parameters could not be inspected or changed unless the definition happened to describe them. ParameterManager now queries them directly. Once the classic parameter download completes, PARAM_EXT_REQUEST_LIST goes out to every non-autopilot component heard from, and to any that appears later. Components which don't implement the protocol simply never answer. The query is held back until the classic download is done so the two don't compete for bandwidth, and missing indices are re-requested a bounded number of times. Ext facts are kept in their own map: they take no part in the load progress, the parameter cache, or the .params file, and they must be written with PARAM_EXT_SET rather than PARAM_SET. componentIds(), parameterNames() and getParameter() merge both maps, so the parameter editor picks them up with no UI change and lists them under their component. Writes go through a state machine mirroring the PARAM_SET one, handling PARAM_ACK_IN_PROGRESS as "keep waiting" and reporting rejections to the user. Because acks are broadcast, a parameter shown in both the parameter view and the camera settings UI stays in sync whichever side writes it. VehicleCameraControl no longer warns about ext values outside its camera definition, since a full list query makes those expected traffic. MockLinkCamera serves a small set of ext parameters on camera 1 only, so the tests also cover components that ignore the query.
Contributor
Build ResultsPlatform Status
All builds passed. Pre-commit
Pre-commit hooks: 2 passed, 77 failed, 7 skipped. Test Resultslinux-coverage-integration: 52 passed, 0 skipped Code CoverageCoverage: 70.7% No baseline available for comparison Artifact Sizes
Updated: 2026-09-03 03:43:51 UTC • Commit: 3ff5777 • Triggered by: Windows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This adds PARAM_EXT parameters to the parameters tab, as requested in https://discord.com/channels/1022170275984457759/1022185820683255908/threads/1544457580351332386.
Tested using PX4 SITL together with this MAVSDK camera example.
Type of Change
Testing
Platforms Tested
Flight Stacks Tested
Screenshots
Checklist
Related Issues
By submitting this pull request, I confirm that my contribution is made under the terms of the project's dual license (Apache 2.0 and GPL v3).