fix(logging): say why the antenna stopped and what the ADIF port is receiving
Two problems from one operator's log, both of them the log's fault. SteppIR. The last line about it is "status query failed, reconnecting: Port has been closed" and then nothing — for the rest of the session. The poll loop does retry every two seconds, but a failed open was a bare `continue`: no line, ever. And startUltrabeam had three silent ways out — settings unreadable, the antenna turned off, no port or host configured — so a cleared field and a lost adapter produced exactly the same evidence, which is none. Both now say what happened, with the port or host named. Reopen failures are reported three times and then throttled (a port that is gone stays gone), and the recovery says how many attempts it took. FLDIGI. Four hundred "ADIF payload ignored" lines and nothing else legible. The cause is in the same log: two inbound listeners on the SAME multicast group and port, 239.255.0.1:2237 — one WSJT (MSHV), one ADIF (FLDIGI). Every WSJT-X packet is delivered to both, and an FT8 cycle is dozens of decodes every fifteen seconds; the bursts in the log are exactly 15 s apart. The ADIF listener now checks for the WSJT-X magic and says so once, with what to do about it, instead of rejecting each packet in writing. Anything else is described a few times with its payload and then goes quiet.
This commit is contained in:
@@ -15172,13 +15172,32 @@ func (a *App) startUltrabeam() {
|
||||
go a.motorAnt.Stop()
|
||||
a.motorAnt = nil
|
||||
}
|
||||
// Every way out of here used to be silent, which is how an antenna that had
|
||||
// been working for three minutes went off the air with NOTHING in the log
|
||||
// after the disconnection — the operator could not tell a deliberate stop
|
||||
// from a lost port from a cleared setting.
|
||||
s, err := a.GetUltrabeamSettings()
|
||||
if err != nil || !s.Enabled {
|
||||
if err != nil {
|
||||
applog.Printf("antenna: not started — settings unavailable: %v", err)
|
||||
return
|
||||
}
|
||||
if !s.Enabled {
|
||||
applog.Printf("antenna: not started — turned off in Settings")
|
||||
return
|
||||
}
|
||||
c := newMotorClient(s)
|
||||
if c == nil {
|
||||
return // not configured (missing host/COM)
|
||||
if s.Transport == "serial" {
|
||||
applog.Printf("antenna: %s not started — no serial port configured", s.Type)
|
||||
} else {
|
||||
applog.Printf("antenna: %s not started — no host configured", s.Type)
|
||||
}
|
||||
return
|
||||
}
|
||||
if s.Transport == "serial" {
|
||||
applog.Printf("antenna: %s starting on %s @ %d baud", s.Type, s.COM, s.Baud)
|
||||
} else {
|
||||
applog.Printf("antenna: %s starting on %s:%d", s.Type, s.Host, s.Port)
|
||||
}
|
||||
a.motorAnt = c
|
||||
_ = a.motorAnt.Start()
|
||||
|
||||
Reference in New Issue
Block a user