Skip to content

fix(cwx): release TX when CWX queue drains — fixes stuck-in-TX after macro#2507

Merged
ten9876 merged 1 commit into
mainfrom
worktree-issue-2450-cwx-tx-teardown
May 9, 2026
Merged

fix(cwx): release TX when CWX queue drains — fixes stuck-in-TX after macro#2507
ten9876 merged 1 commit into
mainfrom
worktree-issue-2450-cwx-tx-teardown

Conversation

@jensenpat

Copy link
Copy Markdown
Collaborator

Summary

  • CwxModel::applyStatus() never handled the queue= status key the radio sends when its CWX buffer empties
  • With sync_cwx=1 the radio expects an explicit xmit 0 from the client after macro completion; without it the radio held TX until its ~60 s hardware interlock watchdog fired
  • Added queueEmpty() signal to CwxModel, fired when queue= arrives empty
  • RadioModel connects to it: clears m_cwxActive and calls setMox(false) → sends xmit 0, returning the radio to RX immediately

Root cause chain

  1. User fires CWX macro → m_cwxActive = true
  2. Radio transmits CW, sends S<handle>|cwx queue= when buffer drains
  3. applyStatus() had no queue handler — m_cwxActive stayed true
  4. Interlock handler guards on !m_cwxActive → never forced TX off
  5. Radio held TX waiting for xmit 0 → self-recovered via ~60 s hardware watchdog

Tested

  • Verified on FLEX-8600 fw 4.2.18.41174: relay clicks back to RX immediately after last tone, TX light clears, interlock state returns to READY
  • QSK + Break-In enabled, macro sent via CWX window Send button and Fx key — both paths clean

Fixes / closes

Test plan

  • Connect to any FLEX radio with CW slice, QSK + Break-In enabled
  • Send a CWX macro via Send button
  • Send a CWX macro via Fx key
  • Confirm radio returns to RX immediately after last character — no 60 s delay
  • Confirm RX audio resumes normally (regression check for RX audio lost after CWX macro/send transmission on AetherSDR 0.9.5.1 #2306)
  • Confirm ESC / clearBuffer mid-macro still works (clears m_cwxActive via cwx clear path, unchanged)

🤖 Generated with Claude Code

…macro (#2450)

CwxModel::applyStatus() never handled the `queue=` status key the radio
sends when its CWX buffer empties. With sync_cwx=1 the radio expects an
explicit xmit 0 from the client after macro completion; without it the
radio held TX until its ~60 s hardware interlock watchdog fired.

Add a queueEmpty() signal fired when queue= arrives empty (or "0").
RadioModel connects to it: clears m_cwxActive and calls setMox(false),
which sends xmit 0 and returns the radio to RX immediately.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jensenpat jensenpat requested a review from ten9876 as a code owner May 9, 2026 18:08
@ten9876 ten9876 merged commit 3d5d8b4 into main May 9, 2026
5 checks passed
@ten9876 ten9876 deleted the worktree-issue-2450-cwx-tx-teardown branch May 9, 2026 18:57
@ten9876

ten9876 commented May 9, 2026

Copy link
Copy Markdown
Collaborator

Claude here — thank you @jensenpat, this is a great catch and a clean fix. Targeted, well-scoped, real-hardware verified, and it knocks out two open bugs (#2450 was a high-priority safety/CW issue and #2306 the audio-loss regression) in one shot. The defensive val.isEmpty() || val == "0" parse and the if (!m_cwxActive) return downstream guard are both nice touches. Merged and shipping in the next release — credit will land in the release notes.

73, Jeremy KK7GWY & Claude (AI dev partner)

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.

CWX macro / Fx key TX leaves radio stuck in TX >60 s before returning to RX RX audio lost after CWX macro/send transmission on AetherSDR 0.9.5.1

2 participants