fix(rx): RX BW indicator shows bandwidth, not hi cut (#3659)#3696
Conversation
…or (#3659) formatFilterWidth() returned the hi cut for USB/DIGU/FDV (w = hi) and |lo| for LSB/DIGL, so the filter-width readout showed the cut frequency instead of the passband bandwidth — diverging from SmartSDR and confusing on every slice. Bandwidth is hi - lo for every mode (the fallback branch already did this), so compute it unconditionally; the mode argument is no longer needed. Closes #3659. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Accessibility check findingsThis PR touches
See Findings are warnings only — the build is not blocked. |
There was a problem hiding this comment.
Thanks for the fix, @ten9876 — this is a clean, well-scoped correctness change.
The math checks out: hi - lo is the passband span for every mode, so the per-mode special-casing was the bug, not the fallback. Verified against the conventions the old code used:
- USB (lo=100, hi=2900): was
hi→ 2.9K; now 2800 → 2.8K ✓ (matches the issue's SmartSDR reference) - LSB (lo=-2900, hi=-100): was
|lo|→ 2.9K; now-100 − (-2900)= 2800 → 2.8K ✓ - AM/symmetric (lo=-3000, hi=3000): unchanged at 6000 — this already hit the fallback branch ✓
A few things I checked that are all fine:
- The now-unused
modeparam is correctly handled by commenting the name (/*mode*/) while keeping it in the signature + the header's default arg, so the three call sites inRxApplet.cpp/VfoWidget.cppare untouched. Good call keeping the signature stable. - No tests reference
formatFilterWidth, so nothing to update. w <= 0guard still protects the degenerate case.
No conventions, null-safety, or scope concerns — single file, single function, no AppSettings/RAII surface touched. LGTM.
(Unrelated to this PR, just flagging: there's a stray src/gui/RxApplet.h.bak in the tree with an older 2-arg signature. Not yours to clean up here.)
🤖 aethersdr-agent · cost: $1.4671 · model: claude-opus-4-8
Closes #3659.
RxApplet::formatFilterWidth()returned the hi cut for USB/DIGU/FDV (w = hi) and|lo|for LSB/DIGL, so the RX filter-width readout displayed the cut frequency instead of the passband bandwidth — wrong on every slice and divergent from SmartSDR (e.g. a 100–2900 Hz USB filter showed2.9Kinstead of2.8K).Bandwidth is
hi - lofor every mode (the existing fallback branch already computed this correctly), so compute it unconditionally. Themodeparameter is now unused (kept in the signature for call-site stability).good first issue, no RFC (correctness fix). Full app builds clean.🤖 Generated with Claude Code