Skip to content

fix(rx): RX BW indicator shows bandwidth, not hi cut (#3659)#3696

Merged
ten9876 merged 1 commit into
mainfrom
fix/rx-bw-indicator
Jun 21, 2026
Merged

fix(rx): RX BW indicator shows bandwidth, not hi cut (#3659)#3696
ten9876 merged 1 commit into
mainfrom
fix/rx-bw-indicator

Conversation

@ten9876

@ten9876 ten9876 commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

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 showed 2.9K instead of 2.8K).

Bandwidth is hi - lo for every mode (the existing fallback branch already computed this correctly), so compute it unconditionally. The mode parameter 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

…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>
@ten9876 ten9876 requested a review from a team as a code owner June 20, 2026 18:15
@github-actions

Copy link
Copy Markdown

Accessibility check findings

This PR touches src/gui/ files with 1 accessibility issue(s).
Full details appear as inline annotations on the diff above.

Files scanned : 1
Files with findings: 1
Total findings : 1

See docs/a11y.md for the canonical
Qt patterns (setAccessibleName, QAccessibleValueChangeEvent,
QAccessibleInterface subclasses, etc.). Structural remediation
(keyboard navigation, custom QAccessibleInterface subclasses)
is tracked in #3288.

Findings are warnings only — the build is not blocked.

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 mode param is correctly handled by commenting the name (/*mode*/) while keeping it in the signature + the header's default arg, so the three call sites in RxApplet.cpp/VfoWidget.cpp are untouched. Good call keeping the signature stable.
  • No tests reference formatFilterWidth, so nothing to update.
  • w <= 0 guard 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

@ten9876 ten9876 merged commit cc24874 into main Jun 21, 2026
6 checks passed
@ten9876 ten9876 deleted the fix/rx-bw-indicator branch June 21, 2026 04:33
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.

RX BW Filter indicator shows Hi Cut, not BW

1 participant