lua-howto: document the Antenna Group receiver setting - #555
Draft
MUSTARDTIGERFPV wants to merge 1 commit into
Draft
lua-howto: document the Antenna Group receiver setting#555MUSTARDTIGERFPV wants to merge 1 commit into
MUSTARDTIGERFPV wants to merge 1 commit into
Conversation
Ant. Group was added in 4.1 and has no documentation. It sits next to Antenna Mode in the receiver settings, and the two are easy to confuse, so the new section states the difference. Facts are from RXParameters.cpp and rx_main.cpp: - The options are exactly External and Builtin. - The parameter is only registered when GPIO_PIN_ANT_GROUP is defined, so it does not appear on most receivers. - The pin is written in updateDiversity(), which runs continuously, so a change applies at once with no reboot. - SetAntennaGroup raises EVENT_CONFIG_MODEL_CHANGED, so the value is stored with the model and survives a power cycle.
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.
Ant. Groupwas added in 4.1 and has no documentation on the site. It sits directly next toAntenna Modein the receiver settings and the two are easy to confuse, so the new section is placed afterAntenna Modeand states the difference explicitly.Verified behavior
ExternalandBuiltinluaAntennaGroupinRXParameters.cpp, option string"External;Builtin"if (GPIO_PIN_ANT_GROUP != UNDEF_PIN)digitalWrite(GPIO_PIN_ANT_GROUP, config.GetAntennaGroup())is insideupdateDiversity()inrx_main.cpp, which runs continuously rather than only at bootRxConfig::SetAntennaGroupsetsEVENT_CONFIG_MODEL_CHANGEDgit tag --containsreturns only 4.1.0 and 4.1.0-RC1Naming note for reviewers
There is an inconsistency in the firmware that I did not carry into the docs. The Lua parameter offers
External;Builtin, but the Hardware Layout schema describes the same pin as selecting "internal/external antenna port(s)". The page uses the Lua labels, since those are what the user actually sees in the script and the Web UI. Worth aligning upstream at some point.I did not state a default. The field is a 1 bit config value and is not explicitly initialised in
SetDefaults, so while it is almost certainlyExternal, that follows from struct zeroing rather than from anything explicit, and it did not seem worth asserting.