ardupilotmega.xml - remove empty parameters #389
Open
hamishwillee wants to merge 1 commit intoArduPilot:masterfrom
Open
ardupilotmega.xml - remove empty parameters #389hamishwillee wants to merge 1 commit intoArduPilot:masterfrom
hamishwillee wants to merge 1 commit intoArduPilot:masterfrom
Conversation
Collaborator
|
does this change any of the generated code for C or python? |
Author
@tridge Excellent question. The answer is "just the documentation". For both C/Python anywhere that would have taken the text "Empty" from the description (in this case Note that if you instead use the We might arguably decide that we should remove the default value Note:
|
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.

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.xmlhas 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:
NaNand int params are defaultINT32_MAXdefaultvalue 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.defaultattribute :-) - but again, if no one is doing this, better to have a simple rule.