Skip to content

Read radio-side SWR meter when sweeping through TGXL bypass#2230

Merged
ten9876 merged 1 commit intomainfrom
fix/swr-sweep-tgxl-meter-source
May 1, 2026
Merged

Read radio-side SWR meter when sweeping through TGXL bypass#2230
ten9876 merged 1 commit intomainfrom
fix/swr-sweep-tgxl-meter-source

Conversation

@ten9876
Copy link
Copy Markdown
Owner

@ten9876 ten9876 commented May 1, 2026

Closes #2229

Problem

SWR sweep aborts with SWR sweep stopped: no fresh TGXL SWR meter data whenever the user has a TGXL in OPERATE mode at sweep start.

The pre-sweep logic at MainWindow.cpp:10854-10856 selects meterSource = Tgxl, then commands the TGXL into BYPASS to measure raw antenna SWR. Once in bypass the TGXL is a passive wire-through — its measurement engine stops emitting RL (return-loss → SWR) meter packets, so tgxlSwrUpdatedAtMs() never advances past sampleNotBeforeMs and the per-step freshness check times out at 900 ms.

Fix

While the TGXL is bypassed, the radio's own SWR coupler sees the same physical signal — the radio measures directly through the bypassed TGXL relays. The reading is equivalent and arrives reliably during the tune carrier.

Switch the meter source to Radio while keeping the "TGXL BYPASS" UI label so users still see what configuration is in use.

if (tuner.isPresent() && tuner.isOperate()) {
    m_swrSweep.sourceLabel = QStringLiteral("TGXL BYPASS");
    // Read radio-side SWR even when TGXL is bypassed: in bypass the TGXL
    // is a passive wire-through and stops emitting RL meter packets, so
    // tgxlSwrUpdatedAtMs never advances.  The radio's SWR coupler sees
    // the antenna directly through the bypassed relays — equivalent
    // reading, reliably emitted during the tune carrier.  (#2229)
    m_swrSweep.meterSource = SwrSweepMeterSource::Radio;
    if (!tuner.isBypass()) {
        m_swrSweep.tgxlBypassRequested = true;
        m_swrSweep.tgxlRestoreNeeded = true;
    }
}

Test plan

  • Build clean on Linux
  • On-air test with FLEX-8600 + TGXL in OPERATE — sweep runs to completion, TGXL restored to OPERATE after sweep
  • CI green

Follow-up

The SwrSweepMeterSource::Tgxl branch is now effectively dead — no operating mode prefers TGXL meters over radio meters during a sweep (TGXL OPERATE during sweep would defeat the raw-antenna-SWR purpose; BYPASS makes the radio reading equivalent and more reliable). Could be removed in a follow-up cleanup PR.

cc @jensenpat — small fix on top of your AetherSweep work.

🤖 Generated with Claude Code

Closes #2229.

The SWR sweep aborted with "no fresh TGXL SWR meter data" whenever
the user had a TGXL in OPERATE mode at sweep start.  Pre-sweep logic
selected `meterSource = Tgxl`, then commanded the TGXL into BYPASS to
measure raw antenna SWR.  Once in bypass the TGXL is a passive
wire-through; its measurement engine stops emitting `RL` (return-loss
→ SWR) meter packets, so `tgxlSwrUpdatedAtMs()` never advances past
`sampleNotBeforeMs` and the per-step freshness check times out at
900 ms.

While the TGXL is bypassed the radio's own SWR coupler sees the same
physical signal — the radio measures directly through the bypassed
TGXL relays.  The reading is equivalent and arrives reliably during
the tune carrier.  Switch the meter source to Radio for the duration
of the sweep; keep the "TGXL BYPASS" UI label so users still see what
configuration is in use.

Tested on FLEX-8600 with TGXL in OPERATE — sweep now runs to
completion and the TGXL is restored to OPERATE after the sweep ends.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ten9876 ten9876 merged commit 5e109d0 into main May 1, 2026
4 checks passed
@ten9876 ten9876 deleted the fix/swr-sweep-tgxl-meter-source branch May 1, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AetherSweep: TGXL meter source goes silent during bypass — sweep aborts with 'no fresh TGXL SWR meter data'

1 participant