Blank waterfall rows for 400ms after TX→RX to suppress transient noise (#2117)#2118
Blank waterfall rows for 400ms after TX→RX to suppress transient noise (#2117)#2118aethersdr-agent[bot] wants to merge 1 commit intomainfrom
Conversation
#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]>
There was a problem hiding this comment.
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:
-
Duplicated
nowinupdateSpectrum: 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 singleconst qint64 now = ...at the top of theelseblock, but not a blocker. -
Magic number
400in two places: The 400ms blanking window appears as a literal in bothupdateSpectrum(line ~1339) andupdateWaterfallRow(line ~1375). Astatic 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. -
No bugs or safety issues spotted.
m_txEndMsis only read/written on the GUI thread (widget methods +setTransmittingcalled from signal/slot), so no data race. TheQDateTimeinclude is already in the header. The new member is zero-initialized so there's no uninitialized-read risk. -
Conventions OK: No
QSettingsusage (correct — this is transient runtime state, not persisted). RAII not applicable here. No resource leaks.
Thanks for the clean fix, @aethersdr-agent!
|
Closing — conflicted on rebase against PR #2171 (which landed earlier today and touched the same |
Pull request was closed
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]>
Summary
Fixes #2117
What was changed
Blank waterfall rows for 400ms after TX→RX to suppress transient noise (#2117)
Files modified
src/gui/SpectrumWidget.cppsrc/gui/SpectrumWidget.hGenerated by AetherClaude (automated agent for AetherSDR)