Skip to content

[shortcuts] Add RF Gain and AGC-T shortcut actions#2710

Merged
ten9876 merged 1 commit into
aethersdr:mainfrom
jensenpat:aether/issue-1908-rf-gain-agct-shortcuts
May 16, 2026
Merged

[shortcuts] Add RF Gain and AGC-T shortcut actions#2710
ten9876 merged 1 commit into
aethersdr:mainfrom
jensenpat:aether/issue-1908-rf-gain-agct-shortcuts

Conversation

@jensenpat

Copy link
Copy Markdown
Collaborator

Summary

Adds four assignable keyboard shortcut actions for issue #1908:

  • RF Gain Up
  • RF Gain Down
  • AGC-T Up
  • AGC-T Down

The actions ship without default key bindings so operators can assign their own shortcuts from Configure Shortcuts.

Details

RF Gain shortcuts step the active panadapter RF gain using the radio-provided range and step size, clamp to the available RF gain limits, update the spectrum overlay immediately, and persist DisplayRfGain through AppSettings so antenna/pan changes retain the selected value.

AGC-T shortcuts operate on the active slice only, stepping AGC threshold by 5 units and clamping through the existing 0-100 AGC threshold behavior.

Closes #1908.

Validation

  • cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo
  • cmake --build build -j22
  • ctest --test-dir build -j22 --output-on-failure (8/8 passed)

👨🏼‍💻 Generated with OpenAI Codex (GPT-5.5 Pro 4/23) and tested by @jensenpat

Co-authored-by: Codex <noreply@openai.com>
@jensenpat jensenpat changed the title Add RF Gain and AGC-T shortcut actions [shortcuts] Add RF Gain and AGC-T shortcut actions May 16, 2026
@jensenpat jensenpat marked this pull request as ready for review May 16, 2026 01:49
@jensenpat jensenpat requested a review from ten9876 as a code owner May 16, 2026 01:49

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @jensenpat — this looks good to me.

The RF Gain handler mirrors the existing overlay-menu handler at src/gui/MainWindow.cpp:10904 exactly (setPanRfGainsw->setRfGainoverlayMenu->setRfGainAppSettings::setValue("DisplayRfGain")save()), so the antenna/pan restore path at line 2427 picks the value up correctly. Pointer guards on pan, sw, and menu are all in place, and std::max(1, pan->rfGainStep()) is a sensible defense against an unpopulated step.

The AGC-T handlers match the surrounding pattern (activeSlice() guard, clamp to the existing 0–100 model range), and autoRepeat=true on all four matches the tune/CW shortcuts that also want hold-to-step behavior.

One minor observation, not blocking: if the radio hasn't yet reported rf_gain_low/rf_gain_high (both default 0), std::clamp will pin to 0 on every press until the limits arrive. Probably acceptable as a fail-quiet, but if you want to suppress the no-op write you could early-return when rfGainLow() >= rfGainHigh().

Closes #1908 as advertised. Nice job keeping the diff tight and the default key bindings empty.

@ten9876 ten9876 merged commit a3ff72e into aethersdr:main May 16, 2026
5 checks passed
ten9876 added a commit that referenced this pull request May 16, 2026
The original streamdeck-tune-step commit (3233762) was authored on
top of a pre-#2710 main and inadvertently removed the 45 lines that
PR #2710 added to MainWindow.cpp (stepActivePanRfGain lambda + four
registerAction calls for rf_gain_up / rf_gain_down / agct_up /
agct_down).

Restore MainWindow.cpp to match origin/main so the Stream Deck plugin
change can land without silently reverting the RF Gain / AGC-T
shortcut feature.

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.

[Enhancement] Add Keyboard Shortcut Actions for RF Gain and AGC-T controls

2 participants