Skip to content

Hide 8000-series DSP filters (NRL, NRS, RNN, NRF) on 6000-series radios (#2177)#2178

Closed
aethersdr-agent[bot] wants to merge 1 commit into
mainfrom
aetherclaude/issue-2177
Closed

Hide 8000-series DSP filters (NRL, NRS, RNN, NRF) on 6000-series radios (#2177)#2178
aethersdr-agent[bot] wants to merge 1 commit into
mainfrom
aetherclaude/issue-2177

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

Fixes #2177

What was changed

Hide 8000-series DSP filters (NRL, NRS, RNN, NRF) on 6000-series radios (#2177)

Files modified

  • src/gui/MainWindow.cpp
  • src/gui/SpectrumOverlayMenu.cpp
  • src/gui/SpectrumOverlayMenu.h
  • src/gui/VfoWidget.cpp
  • src/gui/VfoWidget.h
  • src/models/RadioModel.h
 src/gui/SpectrumOverlayMenu.h   |  2 ++
 src/gui/VfoWidget.cpp           | 14 ++++++++++----
 src/gui/VfoWidget.h             |  2 ++
 src/models/RadioModel.h         |  9 +++++++++
 6 files changed, 47 insertions(+), 4 deletions(-)

Generated by AetherClaude (automated agent for AetherSDR)

…os (#2177)

Add RadioModel::hasExtendedDspFilters() to identify BigBend/DragonFire
platforms that support the extended firmware DSP filters. Gate visibility
of NRL, NRS, RNN, and NRF in both VfoWidget and SpectrumOverlayMenu
based on this flag, wired before slice setup so the initial layout is
correct.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review — PR #2178

Thanks for working on the DSP filter visibility gating for 6000-series radios. The core feature (hiding NRL/NRS/RNN/NRF on radios that lack them) looks correct and well-placed. However, this PR has significant scope issues that need to be addressed before merge.

Scope concern — SliceColorManager removal reverts #2155

The stated scope is "Hide 8000-series DSP filters on 6000-series radios," but the PR also:

  • Deletes SliceColorManager entirely (.h + .cpp, ~193 lines)
  • Removes the "Themes" tab from RadioSetupDialog (~161 lines of UI code)
  • Reverts all consumers (CatControlApplet, RxApplet, SpectrumWidget, VfoWidget, main.cpp) from SliceColorManager::instance() back to raw kSliceColors[] access
  • Removes the colorsChanged signal connections from VfoWidget and SpectrumWidget

This effectively reverts the entire Customizable Slice Colors feature from PR #2155 (merged 2 commits ago). That's a user-facing feature regression that isn't mentioned in the PR title, body, or issue #2177. These changes should either be split into a separate PR with its own justification, or removed from this PR entirely.

Potential crash — hardcoded DSP row indices without bounds check

In SpectrumOverlayMenu::setHasExtendedDsp():

hideRow(m_dspRows[4], has);
hideRow(m_dspRows[5], has);
hideRow(m_dspRows[6], has);
hideRow(m_dspRows[8], has);

The early return (if (m_dspRows.isEmpty()) return;) only guards against a completely empty vector. If m_dspRows is non-empty but has fewer than 9 elements (e.g., a build configuration that excludes some DSP backends), this is an out-of-bounds access and will crash. Suggest:

auto safeHide = [&](int idx, bool visible) {
    if (idx >= m_dspRows.size()) return;
    // ... hide logic
};

Minor: inconsistent bounds checking on kSliceColors[]

RxApplet.cpp correctly guards access:

const char* color = (i < kSliceColorCount) ? kSliceColors[i].hexActive : "#888888";

But CatControlApplet.cpp uses unguarded direct indexing:

.arg(kSliceColors[i].hexActive)
.arg(kSliceColors[ch].hexActive)

The loop variable i runs to kMaxRigctlChannels (currently 4, safely under kSliceColorCount = 8), so this isn't a bug today, but it's inconsistent and fragile. Worth adding the same bounds check for consistency.

DSP filter gating logic looks good

The actual feature implementation is clean:

  • RadioModel::hasExtendedDspFilters() correctly identifies BigBend/DragonFire platforms via model string matching — follows the existing pattern used by maxPanadapters() and other model-detection helpers
  • setHasExtendedDsp() is called at the right time in onSliceAdded() (before wireVfoWidget) and wirePanadapter()
  • Both VfoWidget and SpectrumOverlayMenu correctly gate the 4 extended filters

Recommendation

Please split this into two PRs:

  1. The DSP filter hiding (the actual fix for #2177) — this is ready
  2. The SliceColorManager removal — needs its own discussion and justification, as it reverts a recently merged feature

@ten9876

ten9876 commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator

Closing — the rebase against current main showed −390 deletions across 9 files (CMakeLists, main.cpp, RadioSetupDialog, SliceColorManager.{cpp,h}, CatControlApplet, RxApplet, SpectrumWidget, VfoWidget) which would have silently reverted PR #2155 (Customizable Slice Colors). The bot's branch was based on the moment #2155 landed but didn't include those source files locally.

Re-applied just the substantive +47/-4 hide-filter change as PR #2184 (also adds the missing gating in the syncFromSlice path that this PR missed). Bot couldn't be modified (maintainerCanModify: false).

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

Pull request was closed

@ten9876 ten9876 deleted the aetherclaude/issue-2177 branch April 30, 2026 04:49
ten9876 added a commit that referenced this pull request Apr 30, 2026
…os (#2184)

6000-series radios (FLEX-6300/6400/6500/6600/6700) don't expose the
extended firmware DSP filters that 8000-class hardware does (NRL, NRS,
RNN, NRF).  Showing them in the UI when connected to a 6000-series is
confusing and clutters the DSP panel.

Adds RadioModel::hasExtendedDspFilters() — returns true for BigBend
(8400, 8600), DragonFire (AU-, ML-, CL-, RT-) platforms.  Both the
VfoWidget DSP buttons and the SpectrumOverlayMenu DSP rows hide
those four filters when this returns false.

Carved out of PR #2178 (bot, no maintainerCanModify) which had a
diff that included unrelated -390 lines reverting PR #2155
(Customizable Slice Colors) — its branch was based on the moment
#2155 landed but it didn't include the SliceColorManager source
files, so a rebase showed them as deletions.  This carve-out is just
the substantive +47/-4 hide-filter change.

Improvement over the original PR: the bot only gated the 4 buttons
in setSlice()'s mode-change lambda.  This commit also gates them in
the syncFromSlice() path (line 2915 region) so subsequent mode
changes re-apply the gating consistently.

Fixes #2177.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Do not display 8000-series DSP filters (NRL, NRS, RNN, NRF) for 6000-series radios

1 participant