fix(mavlink): update TransponderReport flag bitmask#27878
Open
anilkir wants to merge 1 commit into
Open
Conversation
Contributor
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 136 byte (0.01 %)]px4_fmu-v6x [Total VM Diff: 144 byte (0.01 %)]Updated: 2026-07-13T02:40:42 |
MaEtUgR
reviewed
Jul 14, 2026
| uint16 PX4_ADSB_FLAGS_SOURCE_UAT = 32768 | ||
|
|
||
| # PX4-internal flag, not part of the MAVLink ADSB_FLAGS bitmask: uses a bit MAVLink leaves unused | ||
| uint16 PX4_ADSB_FLAGS_RETRANSLATE = 512 |
Member
There was a problem hiding this comment.
We could make it the last bit (32768) for now to not change value until there's a conflict with the last bit in MAVLink.
Member
There was a problem hiding this comment.
The last bit is used in MAVLink 🤯 Someone else had the same broken strategy 👀
https://github.com/mavlink/mavlink/blob/f9cb1f9e482977446c3dd953a16368d4834c6aa5/message_definitions/v1.0/common.xml#L3665
Should we make it a separate field to avoid future conflicts or is that overengineered? Let me check 👀
Contributor
Author
There was a problem hiding this comment.
Separate field works for me as it avoids any future conflicts with the MAVLink enum. Let me know your final recommendation
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.
Solved Problem
TransponderReport.msgis missing MAVLink'sSIMULATED,VERTICAL_VELOCITY_VALID,BARO_VALID, andSOURCE_UATflags entirely (mavlink msg definition). ThePX4_ADSB_FLAGS_RETRANSLATEbit (256) also collides with MAVLink'sADSB_FLAGS_BARO_VALIDbit at the same value.Solution
PX4_ADSB_FLAGS_RETRANSLATEto bit 512 (unused by MAVLink'sADSB_FLAGSenum), resolving the collisionChangelog Entry
For release notes:
Alternatives
Test coverage
Context
Related links, screenshot before/after, video