-
Notifications
You must be signed in to change notification settings - Fork 237
Update param protocol with PARAM_ERROR and improve #644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we create an error for this case so that no need for a retry on PARAM_REQUEST_LIST?
| 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is PARAM VALUE/ERROR handling for a read.
| - 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 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