fix(icom): send the leftover-waveform kill blind, at connect

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.
This commit is contained in:
2026-08-30 02:33:19 +02:00
parent d62cd10478
commit b12011fab7
+11 -6
View File
@@ -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()
}