Skip to content

feat(flexcontrol): add CWX F1-F12 macro actions to button mappings (#2721). Principle I.#2725

Merged
ten9876 merged 2 commits into
mainfrom
aetherclaude/issue-2721
May 16, 2026
Merged

feat(flexcontrol): add CWX F1-F12 macro actions to button mappings (#2721). Principle I.#2725
ten9876 merged 2 commits into
mainfrom
aetherclaude/issue-2721

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

Fixes #2721

What was changed

feat(flexcontrol): add CWX F1-F12 macro actions to button mappings (#2721). Principle I.

Files modified

  • src/gui/MainWindow.cpp
  • src/gui/RadioSetupDialog.cpp
  • src/gui/SpectrumWidget.cpp
  • src/gui/SpectrumWidget.h
 src/gui/MainWindow.cpp       |   5 ++
 src/gui/RadioSetupDialog.cpp |   5 +-
 src/gui/SpectrumWidget.cpp   | 107 +++++++++++++------------------------------
 src/gui/SpectrumWidget.h     |   5 +-
 4 files changed, 43 insertions(+), 79 deletions(-)

Generated by AetherClaude (automated agent for AetherSDR)

…2721). Principle I.

Extends the FlexControl per-button action list with CwxF1..CwxF12 so
operators can trigger CWX memories from the knob's tap/double-tap
gestures. Dispatch routes through CwxModel::sendMacro(), which emits
the radio-global "cwx macro send N" command — FlexLib routes it to the
active CW slice (per FlexLib protocol authority), so no extra slice
plumbing is needed. Matches the on-screen F-key click behavior (no
mode-gate); user explicitly mapped the button.

Blast radius: risk_score=0.210, 3 high-risk affected (top:
MainWindow::MainWindow, MainWindow::wirePanadapter,
MainWindow::buildMenuBar). The hook reported file-level risk for
RadioSetupDialog.cpp, but the edit is purely additive (new combo
entries + a new else-if branch) and reuses the existing
AppSettings/sendMacro paths, so no behavioral change for existing
callers.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The CWX F1-F12 commit (781358a) was generated against a SpectrumWidget
snapshot from before PR #2717 landed and inadvertently reverted those
~107 lines: removed the m_draggingDbmRange / m_dbmDragStartRange /
m_dbmDragStartBottom members and undid the matching press/move/release
handling, the isDraggingDbmScale() update, the noise-floor guard
swap, and the paint-order fix.

Restore src/gui/SpectrumWidget.{cpp,h} to the current main state so
the CWX F1-F12 additions in MainWindow.cpp and RadioSetupDialog.cpp
can land without reverting #2717.

Same pattern as the restoration commit on PR #2714 earlier today —
worth investigating the agent's snapshot/cache behaviour upstream.

Co-Authored-By: Claude Opus 4.7 (1M context) <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.

Reviewed the diff — looks good. The implementation is small and focused:

  • actionName.startsWith("CwxF") + mid(4).toInt(&ok) is a robust parse, and the [1,12] bound matches CwxModel::sendMacro's own guard (src/models/CwxModel.cpp:38), so out-of-range entries silently no-op as expected.
  • Dropdown additions in RadioSetupDialog are alongside the existing actions and pick up the AppSettings-backed persistence path already in use for FlexControl button actions — no convention drift.
  • Dispatch is consistent with the existing button-action handler block (sits next to WheelXit), so all 12 macros funnel through the same path used by CwxPanel.

Minor non-blocking note: the PR body lists SpectrumWidget.cpp/h as modified, but the diff only touches MainWindow.cpp and RadioSetupDialog.cpp. That's just a stale description; the actual change is correctly scoped.

Thanks for the patch — nice small, contained addition.

@ten9876 ten9876 merged commit fc9e859 into main May 16, 2026
5 checks passed
@ten9876 ten9876 deleted the aetherclaude/issue-2721 branch May 16, 2026 16:44
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.

Add CWX function key support to FlexControl mappings

1 participant