Skip to content

feat(kpa1500): one-touch amplifier ATU tune (FR-AMP-04) - #186

Open
dc0sk wants to merge 1 commit into
feat/kpa1500-panelfrom
feat/kpa1500-tune
Open

feat(kpa1500): one-touch amplifier ATU tune (FR-AMP-04)#186
dc0sk wants to merge 1 commit into
feat/kpa1500-panelfrom
feat/kpa1500-tune

Conversation

@dc0sk

@dc0sk dc0sk commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Fourth slice: the one-touch ATU tune that FR-AMP-03 deferred. An ATU TUNE control in the amp window runs the KPA1500's full-search tune.

Stacked on #185#184#183.

  • Keys the K4 with a steady carrier (TU1) + starts the amp search (^FT), then drops the carrier (TU0) on completion (^TP seen start→stop), a 20 s hard timeout, or any dropped precondition (amp/K4 link down, TX disarmed).
  • Arm-gated like the K4's own tune — refused with the ARM-TX flash when disarmed — and aborted by the emergency stop (which also sends ^FE).
  • The hard timeout is the safety property: a tune keys the transmitter, so the carrier can never be stranded if the tune hangs or a ^TP reply is missed.

Verification

  • ui::amp_tune_should_end is a pure function, unit-tested over 6 cases (fr_amp_04_tune_end_conditions): keeps running mid-tune, ends on start→stop, ends on timeout even if the amp never reported starting, ends on each dropped precondition.
  • The mock KPA1500 was extended to simulate a tune (^FT^TP1~2 s→^TP0, ^FE cancels); the disarmed amp window shows the ATU TUNE button and the "arm TX to tune" hint (screenshot verified).
  • fmt + clippy + full workspace tests + xtask trace green.
  • Evidence tier: L1 for the end-logic and UI; the armed carrier round-trip is a transmit path → HIL (a run on your real K4 + KPA1500).

🤖 Generated with Claude Code

Add an ATU TUNE control to the amp window that runs the KPA1500's
full-search tune. It keys the K4 with a steady carrier (TU1) and sends
^FT, then drops the carrier (TU0) when the amp reports completion (^TP
seen start->stop), after a 20 s hard timeout, or when a precondition
drops (amp or K4 link down, or TX disarmed).

Because it keys the transmitter it reuses the K4 tune's safety model:
arm-gated (refused with the ARM-TX flash when disarmed), and aborted by
the emergency stop, which also sends ^FE so the amp stops searching. The
hard timeout is the key safety property — the carrier can never be
stranded on air if the tune hangs or a ^TP reply is missed.

The end-decision is a pure, tested function (ui::amp_tune_should_end);
the reconciliation runs on the tick. Verified on screen against a mock
KPA1500 (extended to simulate a tune): the disarmed window shows the ATU
TUNE button and an "arm TX to tune" hint. The armed carrier round-trip is
a transmit path and remains HIL.

This closes the tune deferred by FR-AMP-03.

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