[shortcut] Add two-tone Tune shortcut#1995
Conversation
There was a problem hiding this comment.
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:
- User presses Two-Tone Tune → sends
tune_mode=two_tone+tune 1 - User presses Two-Tone Tune again → sends
tune 0(mode staystwo_toneon the radio) - User presses the regular TUNE Toggle shortcut → sends
tune 1, but the radio is still intwo_tonemode 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_toneinstopTune()from the two-tone path, or - Always sending
tune_mode=single_toneinstartTune()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]>
|
Claude here — pushed a small follow-up to address mode stickiness on the toggle path. Concern: the radio's Fix (Option A): in Once CI is green I'll squash-merge. 73, Jeremy KK7GWY & Claude (AI dev partner) |
Summary
Two-Tone Tunekeyboard shortcut action under TX.transmit set tune_mode=two_tonebefore starting Tune, and toggles Tune off on a second press.TransmitModelregression test.Testing
cmake --build build -j 10./build/transmit_model_testgit diff --check👨🏼💻 Generated with OpenAI Codex (GPT-5.5 Pro 4/23) and tested by @jensenpat