Update param protocol with PARAM_ERROR and improve#644
Open
hamishwillee wants to merge 1 commit intomavlink:masterfrom
Open
Update param protocol with PARAM_ERROR and improve#644hamishwillee wants to merge 1 commit intomavlink:masterfrom
hamishwillee wants to merge 1 commit intomavlink:masterfrom
Conversation
hamishwillee
commented
Oct 29, 2025
Comment on lines
+192
to
+193
| 4. If the targeted component does not have any parameters then it should ignore the `PARAM_REQUEST_LIST` request. | ||
| The GCS may resend the request on timeout if no `PARAM_VALUE` is received, but should cease after resends. |
Collaborator
Author
There was a problem hiding this comment.
Should we create an error for this case so that no need for a retry on PARAM_REQUEST_LIST?
hamishwillee
commented
Oct 29, 2025
Comment on lines
+262
to
+268
| In some cases the drone may not be able write a value, for example because it is a read-only parameter, the specified parameter id or index does not exist, or the id exists but the encoding specified does not match the stored values. | ||
| If the parameter is known (i.e. the id or index is valid) the drone should acknowledge the `PARAM_SET` by broadcasting a `PARAM_VALUE` (in the case of error, with the current/unchanged parameter value). | ||
|
|
||
| 1. GCS should update the [parameter cache](#parameter_caching) (if used) with the new value. | ||
| 1. The GCS may restart the sequence if the expected `PARAM_VALUE` is not received within the timeout, or if the write operation fails (the value returned in `PARAM_VALUE` does not match the value set). | ||
| In older versions of the protocol, if the parameter is unknown the `PARAM_SET` would be silently ignored. | ||
| In newer versions, if [PARAM_ERROR](#PARAM_ERROR) message is supported, it should be sent for any error (alongside `PARAM_VALUE` if its value can be known). | ||
|
|
||
| The GCS may restart the sequence if the expected `PARAM_VALUE` and/or `PARAM_ERROR` is not received within the timeout. |
Collaborator
Author
There was a problem hiding this comment.
This is PARAM VALUE/ERROR handling for a write. Note that it states that you return the PARAM_VALUE if there is a value that can be returend.
hamishwillee
commented
Oct 29, 2025
Comment on lines
+225
to
+229
| In some cases the drone may not be able read a value, such as if an invalid parameter id or index was specified. | ||
| In older versions of the protocol the drone would silently ignore the message. | ||
| In newer versions the drone may return a [PARAM_ERROR](#PARAM_ERROR) message. | ||
|
|
||
| The GCS may restart the sequence if a `PARAM_VALUE` or `PARAM_ERROR` acknowledgment is not received within the timeout. |
Collaborator
Author
There was a problem hiding this comment.
This is PARAM VALUE/ERROR handling for a read.
hamishwillee
commented
Oct 29, 2025
|
|
||
| - C-style encoding of parameters is supported. | ||
| Note however that ArduPilot does not set `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST`. | ||
| C-style encoding of parameters is used and `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` is set on versions since circ a 2022. |
Collaborator
Author
There was a problem hiding this comment.
If you know a version or date that might be handy? I haven't modified the following text for off spec behaviour. To be confirmed how it works.
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.
This updates the param protocol with information about PARAM_ERROR. Designed to match mavlink/mavlink#2365 - in progress.
Some questions for you @peterbarker - we should iterate this in parallel with the link above.
FYI @DonLakeFlyer