Skip to content

Antenna group select - #3684

Merged
pkendall64 merged 6 commits into
ExpressLRS:masterfrom
pkendall64:4.1/antenna-group-select
Jul 9, 2026
Merged

pkendall64 merged 6 commits into
ExpressLRS:masterfrom
pkendall64:4.1/antenna-group-select

Conversation

@pkendall64

@pkendall64 pkendall64 commented Jul 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR adds RX-side support for a secondary antenna group select pin (ant_group) and wires it all the way through to Lua as Ant. Group with External / Builtin options.

In short: the user can now choose which antenna bank to use, e.g internal SMD antennas vs externally connected antennas. Leaving the RX to still argue about antenna A vs antenna B.

What changed

Hardware / target plumbing

  • Added a new hardware option: ant_group
  • Updated the hardware schema/UI to show:
    • clearer naming for ant_ctrl
    • a new RX-only ant_group pin definition

RX config

  • Reused a previously unused config bit, so this feature gets in without demanding a whole new byte like a diva

RX Lua

  • Added a new Lua selection parameter:
    • Ant. Group
    • values: External / Builtin
  • Only registers/shows the option when GPIO_PIN_ANT_GROUP is actually defined

Why

Because you can never have enough antennas sticking out your quad!
This allows RX hardware to have two separate antenna-related controls:

  1. ant_ctrl — select antenna A/B or diversity behavior (this is all we had previously)
  2. ant_group — select which antenna group/port is active, such as external u.FL vs built-in SMD antenna

@pkendall64 pkendall64 added the enhancement 🪄 New feature or request label Jul 2, 2026
@CapnBry

CapnBry commented Jul 3, 2026

Copy link
Copy Markdown
Member

Because you can never have enough antennas sticking out your quad!

lol

I have just the thing to test this with!

Comment thread src/lib/rx-crsf/RXParameters.cpp Resolved

@mha1 mha1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing, saving, retrival of the Antenna Group HW Config (WebUI) and Lua settings work fine using an ER6 (with the same GPIO for Antenna selection).

# Conflicts:
#	src/html/src/utils/hardware-schema.js
#	src/include/hardware.h
#	src/include/target/Unified_ESP_RX.h
#	src/lib/OPTIONS/hardware.cpp
# Conflicts:
#	src/html/headers/web-lr1121-rx.h
#	src/html/headers/web-lr1121-tx.h
#	src/html/headers/web-sx127x-rx-8285.h
#	src/html/headers/web-sx127x-rx.h
#	src/html/headers/web-sx127x-tx-8285.h
#	src/html/headers/web-sx127x-tx.h
#	src/html/headers/web-sx128x-rx-8285.h
#	src/html/headers/web-sx128x-rx.h
#	src/html/headers/web-sx128x-tx-8285.h
#	src/html/headers/web-sx128x-tx.h
@pkendall64
pkendall64 force-pushed the 4.1/antenna-group-select branch from 73aca8a to 686f8fb Compare July 3, 2026 21:47
@CapnBry

CapnBry commented Jul 6, 2026

Copy link
Copy Markdown
Member

This works, and hooray for unused bits in the config struct making this an easy update there.

I agree with Mickey though, this sort of locks manufacturers into having just u.FL and Internal. Should we use more generic naming as he suggests?

Or add string properties to the firmware system and this could just be in the hardware.json what the two options are? haha I joke, let's save that for when the generic name isn't good enough for someone. Or maybe it just becomes a generic 1 bit toggle that a manufacturer can use for anything so both the Lua property name and the values would be strings in the json whoa I am getting carried away.

@CapnBry CapnBry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pkendall64 If you want to change the tag on this to 4.1 that's fine with me. The code you've made is so straight-forward we couldn't possibly break anything! 😅

@pkendall64
pkendall64 merged commit 26357a9 into ExpressLRS:master Jul 9, 2026
26 checks passed
@pkendall64
pkendall64 deleted the 4.1/antenna-group-select branch July 9, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement 🪄 New feature or request V4.1 🍑

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants