fix(icom): standby is not a fault — the quiet recovery needs prior CI-V

A radio in standby is silent on CI-V by design; only the transport chats.
The quiet-recovery added for the mid-session deafness treated that silence
as the fault it usually is and tore the session down every 15 s — taking the
console and its ON button with it, so a radio that was off when OpsLog
started could never be turned on. The recovery now arms only once the
session has heard at least one CI-V payload.
This commit is contained in:
2026-08-30 01:55:35 +02:00
parent ec967e29cf
commit 9c459c754f
2 changed files with 12 additions and 3 deletions
+8 -1
View File
@@ -403,6 +403,12 @@ func (n *icomNet) civPump() {
var lastErr error
quietSaid := false
gaveUp := false
// sawData: this session has heard at least one CI-V payload. A radio in
// STANDBY is silent on CI-V by design — only the transport chats — and the
// quiet-recovery below must not treat that as a fault: it was tearing the
// session down every 15 s, and with it the console and its ON button, so a
// radio that was off when OpsLog started could never be turned on at all.
sawData := false
for {
select {
case <-n.done:
@@ -434,6 +440,7 @@ func (n *icomNet) civPump() {
debugLog.Printf("icom net: CI-V replies are back after %s", time.Since(lastData).Round(time.Second))
quietSaid, gaveUp = false, false
}
sawData = true
lastData = time.Now()
n.txAtData.Store(n.txCiv.Load())
n.trackRxSeq(icnLE.Uint16(buf[6:])) // note gaps for retransmit
@@ -468,7 +475,7 @@ func (n *icomNet) civPump() {
}
}
}
if !quietSaid && time.Since(lastData) > 10*time.Second {
if !quietSaid && sawData && time.Since(lastData) > 10*time.Second {
quietSaid = true
scopeAge := "never"
if !lastScope.IsZero() {