Skip to content

Blank waterfall rows for 400ms after TX→RX to suppress transient noise (#2117)#2118

Closed
aethersdr-agent[bot] wants to merge 1 commit intomainfrom
aetherclaude/issue-2117
Closed

Blank waterfall rows for 400ms after TX→RX to suppress transient noise (#2117)#2118
aethersdr-agent[bot] wants to merge 1 commit intomainfrom
aetherclaude/issue-2117

Conversation

@aethersdr-agent
Copy link
Copy Markdown
Contributor

Summary

Fixes #2117

What was changed

Blank waterfall rows for 400ms after TX→RX to suppress transient noise (#2117)

Files modified

  • src/gui/SpectrumWidget.cpp
  • src/gui/SpectrumWidget.h
 src/gui/SpectrumWidget.cpp | 31 +++++++++++++++++++++++++------
 src/gui/SpectrumWidget.h   |  6 +++++-
 2 files changed, 30 insertions(+), 7 deletions(-)

Generated by AetherClaude (automated agent for AetherSDR)

#2117)

After TX ends, the receiver AGC takes ~400ms to settle. During this window,
waterfall data contains elevated noise from the TX→RX switching transient.
This adds a post-TX suppression period that discards waterfall rows (both
native tiles and FFT-derived) until the AGC settles. Also resets the NB
blanker ring buffer on TX→RX so it doesn't carry stale pre-TX data.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@aethersdr-agent aethersdr-agent Bot enabled auto-merge (squash) April 28, 2026 01:28
@aethersdr-agent aethersdr-agent Bot mentioned this pull request Apr 28, 2026
2 tasks
Copy link
Copy Markdown
Contributor Author

@aethersdr-agent aethersdr-agent Bot left a comment

Choose a reason for hiding this comment

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

Reviewed the diff against main. Changes are scoped to SpectrumWidget.cpp and SpectrumWidget.h as stated — no out-of-scope files.

Overall: looks good. The approach is straightforward — record the TX→RX transition timestamp, suppress waterfall rows for 400ms in both the FFT-derived path (updateSpectrum) and native tile path (updateWaterfallRow), then clear the flag. The blanker ring reset (m_wfBlankerRingCount = 0) on TX→RX is a nice touch to avoid stale TX-period baselines corrupting post-TX NB decisions.

A couple of observations:

  1. Duplicated now in updateSpectrum: After the PR, QDateTime::currentMSecsSinceEpoch() is called twice in the RX branch — once for the post-TX blanking check and again inside the native tile timeout check. Trivial to hoist to a single const qint64 now = ... at the top of the else block, but not a blocker.

  2. Magic number 400 in two places: The 400ms blanking window appears as a literal in both updateSpectrum (line ~1339) and updateWaterfallRow (line ~1375). A static constexpr int kPostTxBlankMs = 400; in the private section would make this easier to tune later and make it clear both paths use the same window. Again, not a blocker for a change this small.

  3. No bugs or safety issues spotted. m_txEndMs is only read/written on the GUI thread (widget methods + setTransmitting called from signal/slot), so no data race. The QDateTime include is already in the header. The new member is zero-initialized so there's no uninitialized-read risk.

  4. Conventions OK: No QSettings usage (correct — this is transient runtime state, not persisted). RAII not applicable here. No resource leaks.

Thanks for the clean fix, @aethersdr-agent!

@ten9876
Copy link
Copy Markdown
Owner

ten9876 commented Apr 30, 2026

Closing — conflicted on rebase against PR #2171 (which landed earlier today and touched the same setTransmitting(false) block). Both fixes belong together; re-applied as PR #2182 carrying just the post-TX blanking logic on top of #2171's FFT-fallback reset. Bot couldn't be modified (maintainerCanModify: false).

@ten9876 ten9876 closed this Apr 30, 2026
auto-merge was automatically disabled April 30, 2026 04:19

Pull request was closed

@ten9876 ten9876 deleted the aetherclaude/issue-2117 branch April 30, 2026 04:19
ten9876 added a commit that referenced this pull request Apr 30, 2026
Issue #2117: after TX a bright transient stripe appears in the
waterfall as the receiver AGC settles.  Visible on FLEX-8600 +
Windows 11 in particular.

Adds an `m_txEndMs` timestamp set on TX→RX in setTransmitting(false).
Both the FFT-derived (updateSpectrum) and native-tile (updateWaterfallRow)
push paths check whether < 400 ms has elapsed since that transition,
and skip the row if so.  After 400 ms passes the timestamp is cleared
so subsequent rows fall through normally.

Also resets m_wfBlankerRingCount = 0 so the blanker baseline doesn't
accumulate stale TX-time samples.

Carved out of PR #2118 (bot, no maintainerCanModify) which conflicted
with #2171's already-landed changes to the same setTransmitting(false)
block.  This commit re-applies cleanly on top of #2171, keeping both
fixes (the FFT-fallback flag reset AND the post-TX blanking).

Fixes #2117.

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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.

Waterfall noise after TX

1 participant