Cleanup: Navigator: Vehicle command refactor, FlightTaskAuto: parameter clarification #24764
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.
Solved Problem
While looking into what would be necessary to command the gimbal back to neutral automatically very close to ground I found that the internal interface for that is not as straight forward as I hoped and instead it's necessary to go through a complicated MAVLink protocol dance in every spot within PX4 that wants to do that.
As part of studying that I came across these pieces which I really at least want to refactor for clarity to enable further improvements.
Solution
MPC_LAND_ALT3
parameter descriptionpublish_vehicle_cmd
consume a reference instead of a pointer and rename it topublish_vehicle_command
.Documentation I only adjusted the english version. There seem to be multiple different english versions in other language subdirectories, I still don't understand why such outdated non-translated versions exist.
Changelog Entry
Test coverage
It's refactoring except for the reference instead of pointer but if the previous version was ever called with a
nullptr
it would have hardfaulted.