ardupilotmega.xml - remove empty parameters #389
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.
MAVLink docs/xml is unclear on the meaning of empty, reserved, and undefined parameters, and what the default values of each parameter should be. I've created this PR as a point of discussion before rolling out a consistent strategy.
TLDR;
Proposal:
Whatever we end up agreeing I will roll out everywhere. FYI @auturgy @tridge @julianoes @peterbarker
The long version:
Where we are now:
Inconsistent meaning naming and docs for unused parameters:
<param index="n">Empty</param>
. Note though, it is not defined what this means if someone were to override the dialect.common.xml
has params that are marked as<param index="n">Empty</param>
and<param index="n" reserved="true" />
, and there are also some omitted params. It is not clear if these are the same or somehow different.Default values are defined to be settable in different ways but are ignored:
NaN
and int params are defaultINT32_MAX
default
value for a parameter such as<param index="n" reserved="true" default="NaN">
, overriding the default.Proposal (duplicated from above):
Reasoning for proposal above:
<param index="n">Empty</param>
with<param index="n" reserved="true" />
. Important thing is to be consistent.default
attribute :-) - but again, if no one is doing this, better to have a simple rule.