Add unitType attribute to mavcmd.xml #3475
Merged
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 fixes an issue where commands that used the parameter for anything other than altitude were getting unit conversions applied when they shouldn't have been. I'm also adding a unit label to the altitude column.
This also opens up the possibility of converting units (distance or altitude) for other columns, which I'll do next, probably as part of this PR, but I haven't gotten that far yet.
This will take some careful review to make sure I haven't screwed things up. I looked long and hard at all the places in FlightData that look at
multiplieralt
, but I could have missed something. I've done some basic testing, and it appears to be working.One thing I noticed is that we don't seem to updata
mavcmd.xml
when we update Planner. If the file exists, we don't overwrite it with the one baked into the resources, which seems to be a problem IMO. Someone running Planner that was installed ages ago might not have up-to-date mavcmds, unless I'm mistaken. I can understand not wanting to immediately clobber a customized file, but we have other paths to add custom mission items in config.xml. I made sure to try to handle legacy files just in case.