Skip to content

feat: store tx_slice_mode from transmit status in TransmitModel#2773

Merged
ten9876 merged 1 commit into
aethersdr:mainfrom
NF0T:pr/transmit-tx-slice-mode
May 17, 2026
Merged

feat: store tx_slice_mode from transmit status in TransmitModel#2773
ten9876 merged 1 commit into
aethersdr:mainfrom
NF0T:pr/transmit-tx-slice-mode

Conversation

@NF0T

@NF0T NF0T commented May 16, 2026

Copy link
Copy Markdown
Collaborator

Background

When the active TX slice switches to a FreeDV mode, the radio broadcasts:

transmit tx_slice_mode=FDVU

This key arrives via the existing object == "transmit"applyTransmitStatus() route in RadioModel alongside all other transmit keys (rfpower, tunepower, tune_mode, etc.). Prior to this PR, it was silently dropped — confirmed by grepping the entire codebase for tx_slice_mode, which returned zero results. Storing it is the correct data-layer fix that enables any future TX status indicator (e.g. a "FreeDV TX" chip in the panadapter overlay or TX applet) to consume it without revisiting TransmitModel.

Summary

  • Added m_txSliceMode member to TransmitModel (empty until first transmit status received)
  • Added txSliceMode() getter
  • Added txSliceModeChanged(const QString& mode) signal, emitted immediately on change — consistent with the maxPowerLevelChanged and txFilterCutoffChanged pattern rather than batched into stateChanged, so consumers that specifically care about FreeDV TX mode get a targeted signal
  • tx_slice_mode parsed in applyTransmitStatus() alongside tune_mode and show_tx_in_waterfall
  • Cleared in resetState() on disconnect so a stale "FDVU" value does not persist if the user reconnects to a radio without the FreeDV waveform installed

No UI surface is added in this PR.

Test plan

  • Connect to radio with FreeDV waveform running, switch active slice to FDVU — confirm txSliceModeChanged("FDVU") fires (verify via temporary qCDebug in applyTransmitStatus)
  • Switch slice back to USB — confirm txSliceModeChanged("USB") fires
  • Disconnect and reconnect — confirm txSliceMode() returns empty string after resetState()

🤖 Generated with Claude Code

The radio sends "transmit tx_slice_mode=FDVU" when the active TX slice
enters a FreeDV mode. This key was previously silently dropped in
applyTransmitStatus. Now stored in m_txSliceMode with a txSliceMode()
getter and txSliceModeChanged(mode) signal. Cleared on disconnect via
resetState(). No UI surface — provides the data layer for future FreeDV
TX mode indicators.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@NF0T NF0T requested review from jensenpat and ten9876 as code owners May 16, 2026 23:19

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good — thanks @NF0T.

Verified the claims in the PR description:

  • rg tx_slice_mode and rg txSliceMode both return zero hits on main, so this key was indeed being dropped.
  • The parse site at TransmitModel.cpp:224-227 follows the exact same shape as the surrounding max_power_level / tune_mode blocks, including the "targeted signal + global stateChanged" pattern you flagged.
  • Clearing m_txSliceMode in resetState() is the right call — the FDVU/FDVL strings only make sense if the FreeDV waveform is loaded on the connected radio, so persisting them across a reconnect would be a bug.

No UI consumer yet, but that matches the PR scope, and txSliceModeChanged(const QString&) is a reasonable shape for the eventual TX-status chip to bind against.

One small note (non-blocking): the test plan calls for inserting a temporary qCDebug in applyTransmitStatus to verify the signal fires. If you find yourself doing that more than once for new transmit-status keys, a single trace-level log of unrecognized keys in applyTransmitStatus might be worth a follow-up — but that's clearly outside the scope of this PR.

@ten9876 ten9876 merged commit 8955fb9 into aethersdr:main May 17, 2026
5 checks passed
@ten9876

ten9876 commented May 17, 2026

Copy link
Copy Markdown
Collaborator

Claude here — landed at 01:12 UTC. Seven clean PRs in a single day, Ryan! 🎉

The data-layer scope is exactly right here. Surfacing the silently-dropped `tx_slice_mode` key into TransmitModel with a focused `txSliceModeChanged(QString)` signal (parallel to `maxPowerLevelChanged` rather than batched into `stateChanged`) means any future UI consumer — a "FreeDV TX" chip in the spectrum overlay, a TX-applet indicator, a TCI export — can wire directly without having to inspect every other transmit field for the change. Clean separation between protocol observation and presentation choice.

The grep-confirmed-zero-references audit in the PR description is the right way to demonstrate that a key is genuinely unhandled rather than just unsurfaced — that's the kind of evidence that makes review fast.

Today's tally for you: #2745, #2747, #2752, #2754, #2759, #2771, #2773. Seven PRs, seven distinct code paths. Honestly stellar.

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.

2 participants