Symptom
When the user has a TGXL in OPERATE mode and starts an SWR sweep, the sweep aborts mid-pass with:
SWR sweep stopped: no fresh TGXL SWR meter data
Reproducible on FLEX-8600 with TGXL in OPERATE before the sweep is started.
Root cause
`MainWindow.cpp:10854-10856` selects the meter source based on pre-sweep TGXL state:
```cpp
if (tuner.isPresent() && tuner.isOperate()) {
m_swrSweep.meterSource = SwrSweepMeterSource::Tgxl;
m_swrSweep.sourceLabel = QStringLiteral("TGXL BYPASS");
if (!tuner.isBypass()) {
m_swrSweep.tgxlBypassRequested = true;
m_swrSweep.tgxlRestoreNeeded = true;
}
}
```
Sequence:
- User has TGXL in OPERATE → meter source set to TGXL (`AMP / RL` meter under the TGXL handle).
- Sweep commands TGXL into BYPASS to measure raw antenna SWR.
- While in bypass, the TGXL is a passive wire-through. Its measurement engine stops emitting fresh `RL` (return-loss → SWR) meter packets — there's nothing to actively measure.
- Per-step freshness check at `MainWindow.cpp:10980-10985`:
```cpp
const bool swrFresh = useTgxlMeters
? meters.tgxlSwrUpdatedAtMs() >= m_swrSweep.sampleNotBeforeMs
: meters.swrUpdatedAtMs() >= m_swrSweep.sampleNotBeforeMs;
```
- After `kSwrSweepMaxSettleMs` (900 ms) with no fresh TGXL sample → `finishSwrSweep(true, "...no fresh TGXL SWR meter data")`.
The intent of "TGXL BYPASS" mode was to read antenna SWR through bypassed tuner relays — i.e., what the antenna actually looks like without the tuner correcting it. The meter selection was wired to read TGXL, which goes silent precisely when we asked it to bypass.
Fix
While the TGXL is in bypass, the radio's own SWR coupler sees the same physical signal — the radio measures directly through the bypassed TGXL relays. Reading the radio's meter gives equivalent data and arrives reliably (radio always emits TX SWR during a tune carrier).
The `sourceLabel` ("TGXL BYPASS") can stay — it describes the configuration, not the meter source the UI used internally. The meter source switches to RADIO:
```cpp
if (tuner.isPresent() && tuner.isOperate()) {
m_swrSweep.sourceLabel = QStringLiteral("TGXL BYPASS");
// Radio's SWR coupler reads the antenna directly while TGXL is in
// bypass relays. TGXL stops emitting RL meters in bypass, so use
// the radio's meter for sample freshness.
m_swrSweep.meterSource = SwrSweepMeterSource::Radio;
if (!tuner.isBypass()) {
m_swrSweep.tgxlBypassRequested = true;
m_swrSweep.tgxlRestoreNeeded = true;
}
}
```
The `SwrSweepMeterSource::Tgxl` branch is effectively dead afterwards — no operating mode prefers TGXL meters over radio meters during a sweep (OPERATE would defeat the raw-antenna purpose; BYPASS makes the radio reading equivalent and more reliable). Could be removed in a follow-up cleanup.
Status
cc @jensenpat — Claude here, on Jeremy's behalf. We've identified the issue and the ~3-line fix. Applying locally for testing now; if it pans out we'll send a PR shortly. No action needed from you on this one.
73, Jeremy KK7GWY & Claude (AI dev partner)
Symptom
When the user has a TGXL in OPERATE mode and starts an SWR sweep, the sweep aborts mid-pass with:
Reproducible on FLEX-8600 with TGXL in OPERATE before the sweep is started.
Root cause
`MainWindow.cpp:10854-10856` selects the meter source based on pre-sweep TGXL state:
```cpp
if (tuner.isPresent() && tuner.isOperate()) {
m_swrSweep.meterSource = SwrSweepMeterSource::Tgxl;
m_swrSweep.sourceLabel = QStringLiteral("TGXL BYPASS");
if (!tuner.isBypass()) {
m_swrSweep.tgxlBypassRequested = true;
m_swrSweep.tgxlRestoreNeeded = true;
}
}
```
Sequence:
```cpp
const bool swrFresh = useTgxlMeters
? meters.tgxlSwrUpdatedAtMs() >= m_swrSweep.sampleNotBeforeMs
: meters.swrUpdatedAtMs() >= m_swrSweep.sampleNotBeforeMs;
```
The intent of "TGXL BYPASS" mode was to read antenna SWR through bypassed tuner relays — i.e., what the antenna actually looks like without the tuner correcting it. The meter selection was wired to read TGXL, which goes silent precisely when we asked it to bypass.
Fix
While the TGXL is in bypass, the radio's own SWR coupler sees the same physical signal — the radio measures directly through the bypassed TGXL relays. Reading the radio's meter gives equivalent data and arrives reliably (radio always emits TX SWR during a tune carrier).
The `sourceLabel` ("TGXL BYPASS") can stay — it describes the configuration, not the meter source the UI used internally. The meter source switches to RADIO:
```cpp
if (tuner.isPresent() && tuner.isOperate()) {
m_swrSweep.sourceLabel = QStringLiteral("TGXL BYPASS");
// Radio's SWR coupler reads the antenna directly while TGXL is in
// bypass relays. TGXL stops emitting RL meters in bypass, so use
// the radio's meter for sample freshness.
m_swrSweep.meterSource = SwrSweepMeterSource::Radio;
if (!tuner.isBypass()) {
m_swrSweep.tgxlBypassRequested = true;
m_swrSweep.tgxlRestoreNeeded = true;
}
}
```
The `SwrSweepMeterSource::Tgxl` branch is effectively dead afterwards — no operating mode prefers TGXL meters over radio meters during a sweep (OPERATE would defeat the raw-antenna purpose; BYPASS makes the radio reading equivalent and more reliable). Could be removed in a follow-up cleanup.
Status
cc @jensenpat — Claude here, on Jeremy's behalf. We've identified the issue and the ~3-line fix. Applying locally for testing now; if it pans out we'll send a PR shortly. No action needed from you on this one.
73, Jeremy KK7GWY & Claude (AI dev partner)