Skip to content

Merge PR #11 partial: rigctld CAT, TX fix (DAX deferred)#62

Merged
ten9876 merged 14 commits into
mainfrom
merge/pr-11-partial
Mar 16, 2026
Merged

Merge PR #11 partial: rigctld CAT, TX fix (DAX deferred)#62
ten9876 merged 14 commits into
mainfrom
merge/pr-11-partial

Conversation

@ten9876

@ten9876 ten9876 commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator

Partial merge of PR #11 by @pepefrog1234

Accepted

  • Fix stuck TX — immediately gate MOX audio on unkey
  • Hamlib rigctld — TCP server (port 4532) + PTY virtual serial port (/tmp/AetherSDR-CAT)
  • CatApplet GUI — settings panel for rigctld TCP and PTY controls
  • Style fixes — gradient title bars, green toggle buttons per STYLEGUIDE.md

Deferred

Changes from original PR

  • QSettings → AppSettings XML migration
  • DAX code removed (placeholder in CatApplet)
  • CatApplet styled to match STYLEGUIDE.md
  • ConnectionPanel::isCollapsed() getter added
  • Rebase conflicts resolved

Closes #16 (Hamlib/rigctld CAT interface)

Original PR: #11

pepefrog1234 and others added 14 commits March 16, 2026 11:47
When turning off MOX, immediately set m_transmitting=false and emit
moxChanged(false) before sending "xmit 0" to the radio. This prevents
TX audio from continuing to stream during the 7-15 second interlock
state transition (UNKEY_REQUESTED → READY) on fw v1.4.0.0.

Also gate TX in RadioModel::setTransmit() for the same reason.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement a rigctld protocol emulator that allows WSJT-X, fldigi, and
other Hamlib-compatible software to control the radio. Includes:

- RigctlProtocol: pure protocol parser/responder (no I/O), supports
  get/set freq, mode, VFO, PTT, split, dump_state, batch commands
- RigctlServer: QTcpServer wrapper, multi-client, per-client state
- RigctlPty: openpty() virtual serial port with /tmp/AetherSDR-CAT symlink

Mode mapping verified against FLEX-8600 fw v1.4.0.0. Thread-safe writes
via QMetaObject::invokeMethod with Qt::QueuedConnection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CatApplet: settings panel for rigctld TCP, virtual serial port, and
  DAX audio enable/disable with port configuration
- AppletPanel: persistent applet toggle states via QSettings, add CAT
  button; refactor addApplet() to restore saved visibility on startup
- MainWindow: wire up RigctlServer, RigctlPty, DaxStreamManager,
  VirtualAudioBridge; auto-start CAT/DAX based on saved settings;
  save/restore frequency, mode, connection panel collapsed state
- RadioModel: restore last frequency/mode from QSettings on reconnect
- CMakeLists.txt: add all new source files and HAL plugin subdirectory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Migrate QSettings → AppSettings for connection panel collapsed state
- Add ConnectionPanel::isCollapsed() public getter
- Remove deprecated band memory restore (issue #9)
- All settings now use AppSettings XML format

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace sectionHeader() with appletTitleBar() for gradient title bars
- Replace QCheckBox enables with QPushButton toggles (green active style)
- Matches STYLEGUIDE.md conventions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
DAX virtual audio needs PipeWire virtual devices to work with existing
ham radio software (WSJT-X, fldigi, FreeDV). The shared memory IPC
approach has no compatibility with standard audio apps.

Removed:
- DaxStreamManager, VirtualAudioBridge (shared memory IPC)
- macOS HAL plugin (hal-plugin/)
- DAX gain/TX gain sliders and enable button from CatApplet
- All DAX wiring from MainWindow

Kept:
- Hamlib rigctld TCP server (port 4532) + PTY virtual serial port
- CatApplet GUI with rigctld/PTY controls
- TX stuck fix (MOX gating in TransmitModel)
- DAX title bar with "coming soon" placeholder

DAX tracked in issue #15.

Co-Authored-By: pepeforg1234 <pty.11111@gmail.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SEGV occurred in QPainter::drawLine during paintEvent when rigctld
was stopped while WSJT-X was actively polling. The crash was in
operator new (allocation failure), likely triggered by painting with
invalid geometry during a state transition.

Added early return guard when width/height are too small to render.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Renamed "Autostart CAT/DAX with SmartSDR" to "with AetherSDR"
- Menu items are now checkable toggles, persisted via AppSettings
- When AutoStartCAT is enabled and radio connects, rigctld TCP server
  and PTY virtual serial port start automatically
- Fixes first-launch WSJT-X connection failure (server wasn't running)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CatApplet was reading cat/tcpEnable and cat/ptyEnable from old QSettings
on construction, causing the toggle buttons to fire and auto-start the
server even when Autostart CAT wasn't enabled.

- Removed per-button state persistence (tcpEnable/ptyEnable) — CAT
  auto-start is now solely controlled by the "Autostart CAT with
  AetherSDR" menu item
- Migrated port setting from QSettings cat/tcpPort to AppSettings CatTcpPort
- Removed all QSettings usage from CatApplet

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Exclude wired actions (network, memory, spots, autostart CAT/DAX)
  from the catch-all "not implemented" handler
- Add debug logging to AutoStartCAT to verify it fires on connect
- Use saved CatTcpPort for autostart server port

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- New "Autostart rigctld with AetherSDR" menu item (TCP server)
- Existing "Autostart CAT with AetherSDR" now controls PTY only
- Both persist independently in AppSettings
- On radio connect, auto-started services sync their CatApplet
  Enable buttons to green via setTcpEnabled()/setPtyEnabled()
- Removed stale auto-start logic from CatApplet::setRigctlPty()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
WSJT-X "Test CAT" took 46 seconds because socket->write() buffered
the dump_state response without flushing. WSJT-X waited for data
that was sitting in Qt's write buffer. Added socket->flush() after
each response write.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
socket->flush() may block if the client isn't reading. Replace with
TCP_NODELAY (LowDelayOption) on client accept to disable Nagle's
algorithm. Responses are sent immediately without buffering delays.

This fixes WSJT-X commands (band change, PTT) being queued for 42+
seconds before executing all at once.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Log every command received and response sent for diagnosing
WSJT-X connection delays. dump_state response format may need
adjustment for faster NET rigctl handshake.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ten9876 ten9876 merged commit 8331ea7 into main Mar 16, 2026
2 checks passed
@ten9876 ten9876 deleted the merge/pr-11-partial branch March 16, 2026 20:03
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.

Hamlib/rigctld CAT interface

2 participants