RadioModel: track CWX active state to keep audio gate open during send#2181
Merged
Conversation
When CWX is sending (the user pressed Send in the CWX window or fired a macro), the radio enters TRANSMITTING via CW keying. The interlock handler at onStatusReceived gates m_txAudioGate based on whether we believe we're the source of TX — but for CWX it had no signal that the local CWX queue is in flight, so the gate was forced off and the local sidetone path silenced. Adds an m_cwxActive flag, set in the cwxModel commandReady lambda when "cwx send" / "cwx macro send" goes out and cleared on "cwx clear" or when the radio leaves the transmitting state. The interlock guard now includes !m_cwxActive in the "should we force gate off" check. Carved out from PR #2103 (which also added a now-redundant startSidetoneStream() call in AudioEngine — already landed via PR #2105 / commit c906165). This PR contains only the substantive CWX-tracking changes. Fixes #2097. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Carves out the substantive CWX-tracking part of PR #2103 (which had a merge conflict because its other change —
startSidetoneStream()in AudioEngine — landed earlier today via PR #2105).What was wrong
When CWX is sending, the radio enters TRANSMITTING via CW keying. The interlock handler in
RadioModel::onStatusReceivedgatesm_txAudioGatebased on whether we believe we're the source of TX:For CWX there was no signal that the local CWX queue is in flight, so this check thought we were a passive observer of someone else's TX and forced the gate off — silencing local sidetone.
What changed
Added
m_cwxActiveflag:cwxModel.commandReadylambda whencwx sendorcwx macro sendis dispatchedcwx clearand on radio state leaving TRANSMITTING (with the existing setTransmitting(false) path)The interlock guard now reads
!m_cwxActiveso CWX-driven TX keeps the audio gate open.Provenance
This is the RadioModel.cpp/h changes from PR #2103 (authored by AetherClaude bot), replayed by hand. The AudioEngine.cpp portion of #2103 (
startSidetoneStream()call) was the same line PR #2105 added; that's already on main, so it's omitted here.Test plan
🤖 Generated with Claude Code