From b12011fab7f6329901b251b0d31f90e691e87cb8 Mon Sep 17 00:00:00 2001 From: rouggy Date: Sun, 30 Aug 2026 02:33:19 +0200 Subject: [PATCH] fix(icom): send the leftover-waveform kill blind, at connect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first attempt sent it only after CI-V answered — but the waveform flood is what stops CI-V answering, so a rig wedged streaming never received its cure. It now goes out at the end of Connect, before anything waits on a reply: an unanswered set costs one frame, and the rig acts on what it decodes whether or not we hear the acknowledgement. --- internal/cat/icomserial.go | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/internal/cat/icomserial.go b/internal/cat/icomserial.go index 42e150c..604de58 100644 --- a/internal/cat/icomserial.go +++ b/internal/cat/icomserial.go @@ -262,6 +262,17 @@ func (b *IcomSerial) Connect() error { // non-default address still RENDERS; this flag only drives the SET/read commands // (mode, span, edges), which need the 0x00 selector to be accepted on the 7300. b.dualScope = idAddr == 0x98 || idAddr == 0xA2 || idAddr == 0x94 + // Silence any LEFTOVER waveform stream, BLIND, before anything else. The + // 0x27 output flag lives in the RADIO and survives sessions; its flood is + // what makes the IC-7760 stop answering CI-V — so waiting for CI-V to + // answer before sending this (the first attempt did) was the egg asking + // the chicken to hatch it. Fire-and-forget: an unanswered set costs one + // frame, and the rig acts on what it decodes whether or not we hear the + // acknowledgement. The front-panel display is deliberately untouched. + // Synchronously: Connect already runs on the CAT goroutine, and a stray + // goroutine writing to the shared link would interleave with the command + // loop. One 350 ms wait at most, once per connect. + _ = b.execScope("waveform output off (leftover)", civ.SubScopeOn, 0) // Defer the DSP snapshot until the rig actually answers CI-V. Over the network // the rig may still be booting (or off) at Connect, so an immediate readDSP // would time out and leave every control at 0 / off with no retry. ReadState @@ -473,12 +484,6 @@ func (b *IcomSerial) ReadState() (RigState, error) { if !b.dspLoaded { b.readDSP() b.dspLoaded = true - // Silence any LEFTOVER waveform stream. The 0x27 output flag lives - // in the RADIO and survives our sessions: a scope enabled by an older - // build (or another program) kept flooding every new session — and on - // the IC-7760 that flood is what kills the CI-V link. The display on - // the rig's front panel is deliberately untouched. - _ = b.execScope("waveform output off (leftover)", civ.SubScopeOn, 0) } else { b.refreshFrontPanel() }