Hide 8000-series DSP filters (NRL, NRS, RNN, NRF) on 6000-series radios (#2177)#2178
Hide 8000-series DSP filters (NRL, NRS, RNN, NRF) on 6000-series radios (#2177)#2178aethersdr-agent[bot] wants to merge 1 commit into
Conversation
…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>
There was a problem hiding this comment.
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
SliceColorManagerentirely (.h + .cpp, ~193 lines) - Removes the "Themes" tab from
RadioSetupDialog(~161 lines of UI code) - Reverts all consumers (
CatControlApplet,RxApplet,SpectrumWidget,VfoWidget,main.cpp) fromSliceColorManager::instance()back to rawkSliceColors[]access - Removes the
colorsChangedsignal connections fromVfoWidgetandSpectrumWidget
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 bymaxPanadapters()and other model-detection helperssetHasExtendedDsp()is called at the right time inonSliceAdded()(beforewireVfoWidget) andwirePanadapter()- Both
VfoWidgetandSpectrumOverlayMenucorrectly gate the 4 extended filters
Recommendation
Please split this into two PRs:
- The DSP filter hiding (the actual fix for #2177) — this is ready
- The SliceColorManager removal — needs its own discussion and justification, as it reverts a recently merged feature
|
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 ( |
Pull request was closed
…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>
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.cppsrc/gui/SpectrumOverlayMenu.cppsrc/gui/SpectrumOverlayMenu.hsrc/gui/VfoWidget.cppsrc/gui/VfoWidget.hsrc/models/RadioModel.hGenerated by AetherClaude (automated agent for AetherSDR)