kopia lustrzana https://github.com/cyoung/stratux
Add dump1090 heartbeat detection
rodzic
a9b631e732
commit
c3809c779e
2
dump1090
2
dump1090
|
@ -1 +1 @@
|
||||||
Subproject commit 7eca082524fa135eb8efd78780f25739efb6a82c
|
Subproject commit 6a9c94fd256a373a73fbc1d46f6c19d54525f2ea
|
|
@ -561,7 +561,12 @@ func esListen() {
|
||||||
var newTi *dump1090Data
|
var newTi *dump1090Data
|
||||||
err = json.Unmarshal([]byte(buf), &newTi)
|
err = json.Unmarshal([]byte(buf), &newTi)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("can't read ES traffic information: %s\n", err.Error())
|
log.Printf("can't read ES traffic information from %s: %s\n", buf, err.Error())
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newTi.Icao_addr & 0xFF000000) != 0 { //24-bit overflow is used to signal heartbeat
|
||||||
|
log.Printf("No traffic last 60 seconds. Heartbeat message from dump1090: %s\n", buf)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue