[controllers] Route FlexControl volume to master volume#2925
Conversation
Co-authored-by: Codex <noreply@openai.com>
There was a problem hiding this comment.
Thanks @jensenpat — change is tight and fixes a real ergonomic issue (wheel-volume only affecting one slice).
The new adjustMasterVolume lambda mirrors the existing TCI masterVolumeRequested path at MainWindow.cpp:4293-4297 (m_titleBar->setMasterVolume(pct) + applyMasterVolume(pct)), so the title bar, audio path, persistence, and TCI broadcast all stay in sync — nice.
A couple of small observations, none blocking:
-
Read source for current value. Reading
curfromAppSettingseach step relies onapplyMasterVolumehaving just written"MasterVolume"to settings (it does, at line 9074). That works, but the title bar slider's current value is arguably the closer canonical source and avoids a settings round-trip per wheel tick. Either is fine — just noting that this couples wheel adjustment to the settings-write behavior inapplyMasterVolume. -
Wheel step size (
steps * 2). This preserves the prior wheel sensitivity (wassteps * 2.0fon slice gain), so muscle memory carries over. Worth confirming2 %per detent still feels right when you're now adjusting a 0–100 master rather than a per-slice float gain — they're the same domain in practice, so likely fine. -
One tiny redundancy.
applyMasterVolumealready clamps to [0,100] internally (lines 9066-9067), so thestd::clamp(cur + deltaPct, 0, 100)in the lambda is belt-and-suspenders. Not worth changing — clamping at the caller beforesetMasterVolumeon the title bar is good practice.
Code looks good to me. AppSettings used correctly, no new resource concerns, scope matches the PR description (single file, both Volume wheel mode and VolumeUp/Down button actions). Closes #2921 as advertised.
…xcontrol-volume # Conflicts: # src/gui/MainWindow.cpp
|
Claude here — merged. Thanks @jensenpat, this is the SmartSDR-parity Pushed merge commit `69598eb9` resolving against #2888's slot-based
The detail worth flagging: #2888 added `WheelMasterAf` as a separate Code comment at the WheelVolume case references #2986 so future Closes #2921. Ships in v26.5.3. 73, |
…3014) Closes #2986. PR #2925 made `FlexWheelMode::Volume` route to master volume (matching SmartSDR per #2921). PR #2888 had previously added a separate `FlexWheelMode::MasterAf` for master volume. After #2925 the two modes were byte-identical — same dispatcher case, same display entry, same code path. This PR collapses them. ## Changes - **Drop `FlexWheelMode::MasterAf` enum value** and the corresponding switch case in `handleFlexControlTuneSteps` + `flexWheelModeName` mapping. - **Fold `WheelMasterAf` into `WheelVolume`** branch in `applyFlexControlWheelAction` via short-circuit OR — body lives once. - **Keep accepting `"WheelMasterAf"` as a string alias** in: - `flexWheelModeForAction` — maps to `FlexWheelMode::Volume` - `FlexControlDialog::isWheelAction` predicate — same back-compat This preserves saved FlexControl bindings that picked "WheelMasterAf" before the consolidation. - **Remove `WheelMasterAf` from the Radio Setup dropdown** so new bindings only see the canonical `WheelVolume`. - **Relabel `WheelVolume` from "Slice AF" to "Master Volume"** in FlexControlDialog's display map — "Slice AF" was the pre-#2925 description and is now misleading (the action no longer touches slice gain). ## Behavior - Users with existing "WheelMasterAf" bindings: continue working unchanged (back-compat alias path). - New users: see one option instead of two identical-behavior choices. - No-binding behavior unchanged. ## Test plan - [x] Builds clean - [ ] Run with a FlexController hardware setup, confirm wheel-volume mode still adjusts master volume - [ ] Verify a previously-saved "WheelMasterAf" binding still works (back-compat alias) - [ ] Verify the Radio Setup dropdown no longer lists WheelMasterAf 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
## Summary - Route FlexControl wheel Volume mode through master volume instead of active slice audio gain. - Route FlexControl VolumeUp/VolumeDown actions through the same master-volume path. ## Validation - `cmake -S . -B build-ninja -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=/opt/homebrew/opt/qt` - `cmake --build build-ninja --parallel 22` - `ctest --test-dir build-ninja --output-on-failure -j22` (15/15 passed) Closes aethersdr#2921 👨🏼💻 Generated with OpenAI Codex (GPT-5.5 Pro 4/23) and tested by @jensenpat Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Jeremy Fielder <kk7gwy@aethersdr.com>
…dr#2986) (aethersdr#3014) Closes aethersdr#2986. PR aethersdr#2925 made `FlexWheelMode::Volume` route to master volume (matching SmartSDR per aethersdr#2921). PR aethersdr#2888 had previously added a separate `FlexWheelMode::MasterAf` for master volume. After aethersdr#2925 the two modes were byte-identical — same dispatcher case, same display entry, same code path. This PR collapses them. ## Changes - **Drop `FlexWheelMode::MasterAf` enum value** and the corresponding switch case in `handleFlexControlTuneSteps` + `flexWheelModeName` mapping. - **Fold `WheelMasterAf` into `WheelVolume`** branch in `applyFlexControlWheelAction` via short-circuit OR — body lives once. - **Keep accepting `"WheelMasterAf"` as a string alias** in: - `flexWheelModeForAction` — maps to `FlexWheelMode::Volume` - `FlexControlDialog::isWheelAction` predicate — same back-compat This preserves saved FlexControl bindings that picked "WheelMasterAf" before the consolidation. - **Remove `WheelMasterAf` from the Radio Setup dropdown** so new bindings only see the canonical `WheelVolume`. - **Relabel `WheelVolume` from "Slice AF" to "Master Volume"** in FlexControlDialog's display map — "Slice AF" was the pre-aethersdr#2925 description and is now misleading (the action no longer touches slice gain). ## Behavior - Users with existing "WheelMasterAf" bindings: continue working unchanged (back-compat alias path). - New users: see one option instead of two identical-behavior choices. - No-binding behavior unchanged. ## Test plan - [x] Builds clean - [ ] Run with a FlexController hardware setup, confirm wheel-volume mode still adjusts master volume - [ ] Verify a previously-saved "WheelMasterAf" binding still works (back-compat alias) - [ ] Verify the Radio Setup dropdown no longer lists WheelMasterAf 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Validation
cmake -S . -B build-ninja -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=/opt/homebrew/opt/qtcmake --build build-ninja --parallel 22ctest --test-dir build-ninja --output-on-failure -j22(15/15 passed)Closes #2921
👨🏼💻 Generated with OpenAI Codex (GPT-5.5 Pro 4/23) and tested by @jensenpat