Skip to content

[shortcut] Add two-tone Tune shortcut#1995

Merged
ten9876 merged 2 commits intoten9876:mainfrom
jensenpat:aether/two-tone-tune-shortcut
Apr 26, 2026
Merged

[shortcut] Add two-tone Tune shortcut#1995
ten9876 merged 2 commits intoten9876:mainfrom
jensenpat:aether/two-tone-tune-shortcut

Conversation

@jensenpat
Copy link
Copy Markdown
Collaborator

Summary

  • Adds an unassigned Two-Tone Tune keyboard shortcut action under TX.
  • Sends transmit set tune_mode=two_tone before starting Tune, and toggles Tune off on a second press.
  • Documents the assignable shortcut and adds a focused TransmitModel regression test.

Testing

  • cmake --build build -j 10
  • ./build/transmit_model_test
  • git diff --check

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

@jensenpat jensenpat changed the title Add two-tone Tune shortcut [shortcut] Add two-tone Tune shortcut Apr 26, 2026
@jensenpat jensenpat marked this pull request as ready for review April 26, 2026 03:29
@jensenpat jensenpat requested a review from ten9876 as a code owner April 26, 2026 03:29
Copy link
Copy Markdown
Contributor

@aethersdr-agent aethersdr-agent Bot left a comment

Choose a reason for hiding this comment

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

Nice, clean contribution — the shortcut registration follows the existing tune_toggle pattern exactly, the setTuneMode input validation is good, and the test coverage is solid. A couple of things worth discussing:

Tune mode not restored on toggle-off

toggleTwoToneTune() calls stopTune() when already tuning, but doesn't reset the radio back to single_tone mode. This means:

  1. User presses Two-Tone Tune → sends tune_mode=two_tone + tune 1
  2. User presses Two-Tone Tune again → sends tune 0 (mode stays two_tone on the radio)
  3. User presses the regular TUNE Toggle shortcut → sends tune 1, but the radio is still in two_tone mode from step 1

Depending on how the radio handles tune_mode persistence, this could surprise the user. Consider either:

  • Sending transmit set tune_mode=single_tone in stopTune() from the two-tone path, or
  • Always sending tune_mode=single_tone in startTune() so regular tune is explicit

If the radio resets tune_mode on its own when tune ends, this is fine as-is — just want to make sure that's the case.

Everything else looks good

  • CMake test target wiring is correct and follows existing patterns.
  • isConnected() guard matches other TX shortcut actions.
  • Help doc update is in scope.
  • Test cases cover the happy path, toggle both directions, and invalid input rejection.

Thanks for the contribution, @jensenpat!

The radio's tune_mode setting is sticky. Without this fix, triggering
the Two-Tone Tune shortcut once and then stopping leaves the radio in
two_tone mode, so the next regular TUNE press produces a two-tone signal
unexpectedly.

Reset tune_mode=single_tone in the toggle's stop branch so the regular
Tune path is unaffected and the toggle leaves no residue.

Co-Authored-By: jensenpat <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ten9876
Copy link
Copy Markdown
Owner

ten9876 commented Apr 26, 2026

Claude here — pushed a small follow-up to address mode stickiness on the toggle path.

Concern: the radio's tune_mode setting persists across tune cycles. After triggering Two-Tone Tune via the shortcut and stopping, tune_mode was left at two_tone, so the next regular TUNE press produced a two-tone signal until the user manually reset.

Fix (Option A): in toggleTwoToneTune()'s stop branch, send tune_mode=single_tone after transmit tune 0. The regular startTune() path is untouched — only the toggle restores. Test updated to verify the new sequence; transmit_model_test passes.

Once CI is green I'll squash-merge.

73, Jeremy KK7GWY & Claude (AI dev partner)

@ten9876 ten9876 enabled auto-merge (squash) April 26, 2026 04:59
@ten9876 ten9876 merged commit c2faa2a into ten9876:main Apr 26, 2026
4 checks passed
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.

2 participants