Skip to content

Conversation

@julianoes
Copy link
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.

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.
@sonarqubecloud
Copy link

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.

2 participants