PX4 custom mode list: align with PX4 definition#14359
Open
sfuhrer wants to merge 1 commit into
Open
Conversation
Align PX4 custom modes backed into QGC with PX4 definitions.
Contributor
|
Thanks for your first pull request! 🎉 A maintainer will review this soon. Please ensure:
We appreciate your contribution to QGroundControl! |
Author
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates QGroundControl’s PX4 custom mode definitions (px4_custom_mode.h) to better match PX4’s upstream mode/sub-mode enumerations, aiming to improve flight mode decoding (e.g., displaying PX4 “Termination” instead of “Unknown”).
Changes:
- Extended
PX4_CUSTOM_MAIN_MODEwith additional main modes (Termination, Altitude Cruise) and updated the Rattitude naming. - Updated
PX4_CUSTOM_SUB_MODE_AUTOto replace deleted RTGS with a reserved value and added VTOL takeoff + EXTERNAL1..8 sub-modes. - Added additional
POSCTLsub-mode(s) (e.g., SLOW) and normalized indentation.
| PX4_CUSTOM_MAIN_MODE_STABILIZED, | ||
| PX4_CUSTOM_MAIN_MODE_RATTITUDE, | ||
| PX4_CUSTOM_MAIN_MODE_SIMPLE /* unused, but reserved for future use */ | ||
| PX4_CUSTOM_MAIN_MODE_RATTITUDE_LEGACY, |
| PX4_CUSTOM_SUB_MODE_AUTO_RTL, | ||
| PX4_CUSTOM_SUB_MODE_AUTO_LAND, | ||
| PX4_CUSTOM_SUB_MODE_AUTO_RTGS, | ||
| PX4_CUSTOM_SUB_MODE_AUTO_RESERVED_DO_NOT_USE, // was PX4_CUSTOM_SUB_MODE_AUTO_RTGS, deleted 2020-03-05 |
Comment on lines
+13
to
+16
| PX4_CUSTOM_MAIN_MODE_RATTITUDE_LEGACY, | ||
| PX4_CUSTOM_MAIN_MODE_SIMPLE, /* unused, but reserved for future use */ | ||
| PX4_CUSTOM_MAIN_MODE_TERMINATION, | ||
| PX4_CUSTOM_MAIN_MODE_ALTITUDE_CRUISE |
Comment on lines
40
to
+43
| enum PX4_CUSTOM_SUB_MODE_POSCTL { | ||
| PX4_CUSTOM_SUB_MODE_POSCTL_POSCTL = 0, | ||
| PX4_CUSTOM_SUB_MODE_POSCTL_ORBIT | ||
| PX4_CUSTOM_SUB_MODE_POSCTL_POSCTL = 0, | ||
| PX4_CUSTOM_SUB_MODE_POSCTL_ORBIT, | ||
| PX4_CUSTOM_SUB_MODE_POSCTL_SLOW |
Contributor
Build ResultsPlatform Status
Some builds failed. Pre-commit
Pre-commit hooks: 4 passed, 44 failed, 7 skipped. Updated: 2026-05-11 10:42:09 UTC • Triggered by: Android |
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.
Align PX4 custom modes backed into QGC with PX4 definitions.
Description
E.g. the PX4 mode "Termination" is not displayed in QGC.

Untested.
Type of Change
Testing
Platforms Tested
Flight Stacks Tested
Screenshots
Checklist
Related Issues
By submitting this pull request, I confirm that my contribution is made under the terms of the project's dual license (Apache 2.0 and GPL v3).