Skip to content

feat(kpa1500): live amp client — poll, telemetry panel, controls (FR-AMP-03) - #185

Open
dc0sk wants to merge 1 commit into
feat/kpa1500-clientfrom
feat/kpa1500-panel
Open

feat(kpa1500): live amp client — poll, telemetry panel, controls (FR-AMP-03)#185
dc0sk wants to merge 1 commit into
feat/kpa1500-clientfrom
feat/kpa1500-panel

Conversation

@dc0sk

@dc0sk dc0sk commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Third slice of KPA1500 support: the live client. Wires the k4-kpa codec (#184) to a real connection and surfaces the amplifier in the UI.

Stacked on #184#183. Merge those first.

  • Worker (app/src/kpa.rs) — mirrors the K4 worker's shared-snapshot model: owns the amp's TCP socket (its own Ethernet server, port 1500), polls on interval, parses via k4_kpa::apply, publishes KpaState + connection status the UI copies on tick. Connect-with-timeout, reconnect backoff, control-command send.
  • Lifecycle — reconciled off the tick against enabled && K4-connected && host-set, so the amp link follows the K4 link, the enable toggle and host edits without per-event wiring; transport errors surface, not silent.
  • UI — a top-bar amp indicator (enabled-only, click opens the window) whose colour/wording follow telemetry (fault red > mode, Operate green w/ live power+SWR, Caution on SWR ≥ 2.0, Standby amber, down-link dim); the KPA1500 window gains live telemetry (mode, power, SWR, temp, band, antenna, ATU, fan, fault, firmware) and controls (Operate/Standby, ATU in/bypass, antenna).

Deferred: a full ATU tune (needs the K4 keyed — couples to the arm-gated TX path).

Verification

End-to-end against a mock KPA1500 TCP server (in demo mode):

  • worker connects (verified ESTAB on port 1500), the amp window fills with live telemetry, the top-bar indicator reads AMP OPER 1200 W SWR 1.3 (green);
  • STANDBY round-trips — the button's ^OS0; reaches the amp, the next poll reflects it, and the panel + indicator flip to Standby.

Indicator precedence/wording is unit-tested (fr_amp_03_amp_indicator_precedence_and_wording). fmt + clippy + full workspace tests + xtask trace all green (pre-commit gate). Evidence tier: L1 for the indicator, mock-server integration for the socket/poll/control path; a run against a real KPA1500 is the remaining HIL step.

🤖 Generated with Claude Code

…AMP-03)

Wire the k4-kpa codec to a real connection. A background worker
(app/src/kpa.rs) mirrors the K4 worker's shared-snapshot model: it owns
the amplifier's TCP socket (its own Ethernet command server, port 1500),
polls on the configured interval, parses replies via k4_kpa::apply, and
publishes a KpaState + connection status the UI copies on tick.

The connection is reconciled off the tick against
`enabled && K4-connected && host-set`, so it follows the K4 link, the
enable toggle and host edits with no per-event wiring, and drops cleanly
otherwise; transport errors surface in the amp window rather than going
silent.

UI: a top-bar amp indicator (shown only when enabled; click opens the amp
window) whose colour and wording follow the telemetry — fault red beats
mode, Operate green with live power/SWR, Caution on SWR >= 2.0, Standby
amber, down-link dim. The KPA1500 window gains live telemetry (mode,
power, SWR, temp, band, antenna, ATU, fan, fault, firmware) and controls
(Operate/Standby, ATU in/bypass, antenna).

Deferred: a full ATU tune (needs the K4 keyed — couples to the arm-gated
TX path).

Verified end to end against a mock KPA1500 TCP server: the worker
connects, the panel fills with live telemetry, the top-bar indicator
reads "AMP OPER 1200 W SWR 1.3", and STANDBY round-trips (command reaches
the amp, poll reflects it back, UI updates). Indicator precedence is
unit-tested (fr_amp_03_amp_indicator_precedence_and_wording).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KiAgfnGv746wwVBSfFkoRY
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.

1 participant