Add optional launch_cmd to auto-start Ardop/VARA/AGWPE TNC daemons - #544
Open
mwthomson wants to merge 4 commits into
Open
Add optional launch_cmd to auto-start Ardop/VARA/AGWPE TNC daemons#544mwthomson wants to merge 4 commits into
mwthomson wants to merge 4 commits into
Conversation
Lets Pat spawn the Ardop, VaraHF, VaraFM, and AX.25/AGWPE transports' backing TNC daemon itself (e.g. ardopcf --webgui 8514, or Direwolf) the first time the transport is used, instead of requiring it to already be running. Launch is skipped when already reachable, retried with a bounded poll on the outgoing connect path, relaunched if the daemon drops out later in the same run, and terminated on Pat exit. Addresses la5nta#537.
This was referenced Aug 25, 2026
Ardop never got the IsZero/IsZeroExceptLaunchCmd default-Addr rescue that AGWPE and VaraHF/VaraFM already have, so a config setting only ardop.launch_cmd (no addr) launches ardopcf successfully but then fails every dial against the never-backfilled empty address. VaraConfig.UnmarshalJSON's port-validation guard had also narrowed to just checking Addr != "", silently accepting a config that sets e.g. rig/ptt_ctrl but no addr instead of failing fast at load time. Fixes la5nta#548 Fixes la5nta#549
…b UI Exposes the launch_cmd (path/args) config already supported by the backend for these four transports, using the same tokenfield widget already used for auxiliary_addresses to represent the args list. Closes la5nta#547
mwthomson
marked this pull request as draft
August 27, 2026 23:25
The new comments across app/connect.go, cfg/config.go, and app/config.go had drifted into multi-paragraph rationale blocks, much of it repeated near-verbatim across the Ardop/VaraHF-VaraFM/AGWPE variants. Condensed back down to the one-or-two-line doc comments used everywhere else in these files, keeping only the genuinely non-obvious why.
mwthomson
marked this pull request as ready for review
August 27, 2026 23:59
Author
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.
Addresses #537.
Adds an optional
launch_cmdsetting to Pat's config for the four transports that depend on an external TNC daemon: Ardop, VaraHF, VaraFM, and AX.25/AGWPE. When set, Pat spawns that daemon itself the first time the transport is used, instead of requiring the user to start it by hand first.Behavior, consistent across all four transports:
ListenerHubretry loop rather than blocking.App.Close()) — no orphaned daemons.Pat failed to launch <transport>on failure; full error only at debug level.launch_cmdunset is a complete no-op, existing behavior unchanged.This directly solves the underlying need in #537 (bringing up
ardopcf's webgui alongside Pat) without Pat embedding or knowing anything about that UI — it just launches whatever command is configured.Test plan
go build ./...,go vet ./...cleango test ./...passes-race), relaunch after crash,App.Close()terminates spawned processes