Skip to content

param_server: add error when params are provided too late#2739

Merged
julianoes merged 1 commit intomainfrom
pr-param-changes
Dec 22, 2025
Merged

param_server: add error when params are provided too late#2739
julianoes merged 1 commit intomainfrom
pr-param-changes

Conversation

@julianoes
Copy link
Copy Markdown
Collaborator

@julianoes julianoes commented Dec 14, 2025

The mavlink parameter protocol uses an index to set/get specific parameters. When all parameters are requested, the total count is sent out, together with all the parameters.

Now once this overall count has been sent out, we can't add/provide more parameters on the server side. Until now, MAVSDK didn't care, but with this commit, we are adding a new error to signal that we can no longer change the param list.

This implementation has a bit of a race condition unfortunately: if a request list message is received right in the beginning when all parameters are added, we lock the list too early. The correct fix for this would be a specific method to "end param provisions" and lock them down. However, requiring such a method would be a breaking change, so I'm not adding this now but I'm considering it for the next major version of MAVSDK.

Alternative to #2085.

Requires mavlink/MAVSDK-Proto#388 to be merged first.

@julianoes julianoes force-pushed the pr-param-changes branch 2 times, most recently from 8127db2 to 85e797c Compare December 14, 2025 23:00
The mavlink parameter protocol uses an index to set/get specific
parameters. When all parameters are requested, the total count is sent
out, together with all the parameters.

Now once this overall count has been sent out, we can't add/provide
more parameters on the server side. Until now, MAVSDK didn't care, but
with this commit, we are adding a new error to signal that we can no
longer change the param list.

This implementation has a bit of a race condition unfortunately: if a
request list message is received right in the beginning when all
parameters are added, we lock the list too early. The correct fix for
this would be a specific method to "end param provisions" and lock them
down. However, requiring such a method would be a breaking change, so
I'm not adding this now but I'm considering it for the next major
version of MAVSDK.
@julianoes julianoes marked this pull request as ready for review December 22, 2025 05:08
@sonarqubecloud
Copy link
Copy Markdown

@julianoes julianoes merged commit b3fd7fd into main Dec 22, 2025
57 checks passed
@julianoes julianoes deleted the pr-param-changes branch December 22, 2025 18:41
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