Skip to content

fix(transmit): route Quindar outro timer through dispatchMoxOff()#3317

Merged
jensenpat merged 1 commit into
aethersdr:mainfrom
NF0T:pr/3224-dispatch-mox-off
May 31, 2026
Merged

fix(transmit): route Quindar outro timer through dispatchMoxOff()#3317
jensenpat merged 1 commit into
aethersdr:mainfrom
NF0T:pr/3224-dispatch-mox-off

Conversation

@NF0T

@NF0T NF0T commented May 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #3224.

TransmitModel::requestPttOff() had two exit paths that reach setMox(false):

  1. Synchronous bypass path — when Quindar is disabled, not in a phone mode, or
    the outro is already in flight. This path correctly consulted m_pttOffHook
    before dropping MOX.

  2. Quindar outro timer callback — when the outro tone must play to completion
    before the carrier drops. This path called setMox(false) directly, silently
    bypassing any installed PttOffHook.

Fix

Extract a private dispatchMoxOff() helper that owns the hook-or-setMox decision
and route both call sites through it. As a bonus, the previously inline hook check
in the synchronous path is replaced by the single dispatchMoxOff() call.

Impact today

Latent — RADE (the only current PttOffHook consumer) uses DIGU/DIGL, which
isPhoneModeForQuindar() excludes, so the timer path cannot fire while RADE's
hook is installed. No user-observable behaviour changes.

Why it still matters

FreeDV modes (FDV/FDVU/FDVL) are already in the isPhoneModeForQuindar() allowlist.
Any future FreeDV EOO hook wired through setPttOffHook() would be silently bypassed
the moment a Quindar-enabled user releases PTT — no additional configuration change
required. The fix eliminates that foot-gun before the wiring is ever attempted.

Test plan

  • SSB TX with Quindar enabled: outro tone plays, carrier drops normally (no hook
    installed — exercises dispatchMoxOff()setMox(false) path)
  • RADE TX: EOO sequence completes and carrier drops (sync path, unchanged — hook
    fires as before via the sync branch)
  • SSB TX with Quindar disabled: carrier drops immediately (no regression)

Refs

🤖 Generated with Claude Code

The PttOffHook was only consulted on the synchronous exit path of
requestPttOff(). The deferred path — the Quindar outro timer callback —
called setMox(false) directly, bypassing the hook. Extract a private
dispatchMoxOff() helper that centralises the hook-or-setMox decision
and route both sites through it.

As a bonus, the synchronous path is simplified: the previously inline
hook check is replaced by the single dispatchMoxOff() call.

Latent today (RADE is excluded from the Quindar phone-mode allowlist),
but immediately live for any future FreeDV EOO hook since FDV/FDVU/FDVL
are already in isPhoneModeForQuindar(). Fixes aethersdr#3224.

Principle VIII.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@jensenpat jensenpat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No findings.

I traced both requestPttOff() exits through the Quindar coordinator, the PttOffHook contract, and the current RADE hook installation/cleanup path. The extracted dispatchMoxOff() preserves the existing synchronous behavior and routes the deferred Quindar outro timer through the same hook-or-setMox(false) decision, which is the missing case this PR is fixing.

The current RADE path remains unaffected because RADE is still on DIGU/DIGL and therefore excluded from isPhoneModeForQuindar(). For future FDV/FDVU/FDVL hook users, the timer path now correctly honors the hook after the outro completes.

CI, macOS/Windows checks, and CodeQL are green on db5ae23.

@jensenpat jensenpat merged commit 7c0a804 into aethersdr:main May 31, 2026
5 checks passed
@NF0T NF0T deleted the pr/3224-dispatch-mox-off branch June 3, 2026 01:05
G6PWY-Chris pushed a commit to G6PWY-Chris/AetherSDR that referenced this pull request Jun 22, 2026
…thersdr#3317)

The PttOffHook was only consulted on the synchronous exit path of requestPttOff(). The deferred Quindar outro timer callback now routes through dispatchMoxOff(), centralizing the hook-or-setMox(false) decision.

Latent today because RADE is excluded from the Quindar phone-mode allowlist, but live for future FDV/FDVU/FDVL hook users. Fixes aethersdr#3224.

Principle VIII.

Co-authored-by: Claude Sonnet 4.6 <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.

follow-up(rade): Quindar outro path bypasses PttOffHook

2 participants