-
Notifications
You must be signed in to change notification settings - Fork 19
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
RFC 0017 - Parameter type include encoding #18
base: master
Are you sure you want to change the base?
RFC 0017 - Parameter type include encoding #18
Conversation
f368d2f
to
61c50ae
Compare
The proposed pattern for the 10 new "cast" and 10 new "bytewise" flags is: `MAV_PARAM_TYPE_[BYTEWISE|CAST]_[UINT8|INT8|UINT16|INT16|UINT32|INT32|UINT64|INT64|REAL32|REAL64]`. | ||
So for example, to send 32-bit integers you could use `MAV_PARAM_TYPE_INT32`, `MAV_PARAM_TYPE_BYTEWISE_INT32`, or `MAV_PARAM_TYPE_CAST_INT32` (by preference you would send using `MAV_PARAM_TYPE_BYTEWISE_INT32` if this was understood by the GCS. | ||
|
||
Question? |
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.
@tridge a few questions here inline - e.g. do we need to indicate support for the old bits? Do we need flags for c-style encoding - after all, wouldn't you update in one go to the new type?
|
||
## Deprecation Path | ||
|
||
TBD. |
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.
Would like advice on this. As stated below, it isn't clear to me what the end point is.
- [ ] Do we need C-style encoding enums? | ||
- [ ] What does the end point look like? i.e. the end protocol is more complicated. | ||
- [ ] Are there other alternatives to aid in migration | ||
- [ ] Is there any reason for PX4 to update to the new types? |
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 relevant. It might be that the impetus is to have a clean common set of instructions at the end of the process.
The design has two parts: | ||
- New enum values in [MAV_PARAM_TYPE](https://mavlink.io/en/messages/common.html#MAV_PARAM_TYPE) that include the parameter type and encoding. | ||
These allow the GCS to decode each param based on its type. | ||
- [`PARAM_REQUEST_READ`](https://mavlink.io/en/messages/common.html#PARAM_REQUEST_READ) and [`PARAM_REQUEST_LIST`](https://mavlink.io/en/messages/common.html#PARAM_REQUEST_LIST) are extended with an 32 bit bitmask indicating which which `MAV_PARAM_TYPE` flags that the GCS/requester understands. |
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.
32 bits assumes you need to have a bit for old, cstyle and union flags.
This RFC proposes a modification to the parameter protocol that makes parameter value encoding explicit in the parameter itself, and allows a GCS to signal the encoding so that a flight stack can configure itself to send the right types if supported.
This will allow:
This eases migration from C-style parameter encoding to byte-wise encoding.
The changes can be used in parallel with the protocol bits that indicate support for bytewise/c style encoding (if you don't want to take these changes, a GCS would still be able to work with the flight stack).