diag(icom net): name the audio stream when CI-V goes quiet
The RX audio stream is experimental and shares the rig's session with CI-V. The shape in an operator's log is unmistakable: audio packets arriving by the hundred while not one CI-V reply comes back, the watchdog tearing the session down, twenty seconds' pause, and the whole thing again — read from outside as "the Icom keeps disconnecting", with nothing pointing at the switch that would end it. The log now says it, and names the setting. icomAudio counts what it has delivered so the line distinguishes "audio is enabled" from "audio is arriving", which is the half that makes it a suspect.
This commit is contained in:
@@ -67,12 +67,26 @@ type icomAudio struct {
|
||||
txOuter uint16
|
||||
txSend uint16
|
||||
lastRx atomic.Int64 // UnixNano of last packet (liveness)
|
||||
rxCount atomic.Int64 // packets delivered on this stream
|
||||
|
||||
done chan struct{}
|
||||
closeOnce sync.Once
|
||||
}
|
||||
|
||||
func (a *icomAudio) markRx() { a.lastRx.Store(time.Now().UnixNano()) }
|
||||
func (a *icomAudio) markRx() {
|
||||
a.lastRx.Store(time.Now().UnixNano())
|
||||
a.rxCount.Add(1)
|
||||
}
|
||||
|
||||
// packets reports whether the stream is actually delivering — the difference
|
||||
// between "audio is on" and "audio is arriving", which is what makes it worth
|
||||
// naming as a suspect when CI-V has gone quiet on the same session.
|
||||
func (a *icomAudio) packets() int64 {
|
||||
if a == nil {
|
||||
return 0
|
||||
}
|
||||
return a.rxCount.Load()
|
||||
}
|
||||
|
||||
// Close tears the audio stream down (disconnect a few times; UDP is lossy).
|
||||
func (a *icomAudio) Close() {
|
||||
|
||||
Reference in New Issue
Block a user