Skip to content

fix(flexcontrol): consolidate WheelMasterAf into WheelVolume (#2986)#3014

Merged
ten9876 merged 1 commit into
mainfrom
auto/issue-2986-flexwheel-consolidation
May 23, 2026
Merged

fix(flexcontrol): consolidate WheelMasterAf into WheelVolume (#2986)#3014
ten9876 merged 1 commit into
mainfrom
auto/issue-2986-flexwheel-consolidation

Conversation

@ten9876
Copy link
Copy Markdown
Collaborator

@ten9876 ten9876 commented May 23, 2026

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-[controllers] Route FlexControl volume to master volume #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

  • 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

PR #2925 changed FlexWheelMode::Volume to route to applyMasterVolume()
(matching SmartSDR's wheel-volume-is-master-volume behavior, fulfilling
#2921).  PR #2888 had previously added a separate FlexWheelMode::MasterAf
intended as a 'master volume' wheel mode while leaving Volume as
slice-gain.  After #2925, both modes had byte-identical bodies in
applyFlexControlWheelAction — same enum-to-string mapping work, same
display dropdown entry, same dispatcher case, all doing the same thing.

Consolidation:

- Drop FlexWheelMode::MasterAf enum value.
- Drop the handleFlexControlTuneSteps switch case for MasterAf and the
  flexWheelModeName mapping that emitted 'MasterAf'.
- In applyFlexControlWheelAction, fold WheelMasterAf into the WheelVolume
  branch via short-circuit OR so the body lives once.
- In flexWheelModeForAction, keep accepting 'WheelMasterAf' as a string
  alias that maps to FlexWheelMode::Volume — back-compat for saved
  FlexControl bindings made before this consolidation.
- In FlexControlDialog's isWheelAction predicate, keep accepting
  'WheelMasterAf' for the same back-compat reason.
- Drop 'WheelMasterAf' from the user-selectable Radio Setup wheel-action
  dropdown so new bindings only see the canonical name.
- Relabel WheelVolume display name from 'Slice AF' to 'Master Volume'
  in FlexControlDialog's action list — 'Slice AF' was the pre-#2925
  description and is now misleading.

Existing user configs that picked 'WheelMasterAf' as the action ID
keep working unchanged.  New users see one option ('WheelVolume' /
'Master Volume') instead of two identical-behavior choices.

Closes #2986.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ten9876 ten9876 requested a review from jensenpat as a code owner May 23, 2026 18:43
@ten9876 ten9876 enabled auto-merge (squash) May 23, 2026 18:43
@ten9876 ten9876 merged commit 1bd4676 into main May 23, 2026
5 checks passed
@ten9876 ten9876 deleted the auto/issue-2986-flexwheel-consolidation branch May 23, 2026 19:13
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.

Consolidate FlexWheelMode::Volume and FlexWheelMode::MasterAf (post-#2925 redundancy)

1 participant