kopia lustrzana https://github.com/cyoung/stratux
rodzic
12f35dbd2e
commit
ef0aa5334a
|
@ -385,6 +385,7 @@ type settings struct {
|
|||
GPS_Enabled bool
|
||||
NetworkOutputs []networkConnection
|
||||
AHRS_Enabled bool
|
||||
DEBUG bool
|
||||
}
|
||||
|
||||
type status struct {
|
||||
|
@ -412,6 +413,7 @@ func defaultSettings() {
|
|||
//FIXME: Need to change format below.
|
||||
globalSettings.NetworkOutputs = []networkConnection{{nil, "", 4000, NETWORK_GDL90_STANDARD, false, nil}, {nil, "", 43211, NETWORK_GDL90_STANDARD | NETWORK_AHRS_GDL90, false, nil}, {nil, "", 49002, NETWORK_AHRS_FFSIM, false, nil}}
|
||||
globalSettings.AHRS_Enabled = false
|
||||
globalSettings.DEBUG = false
|
||||
}
|
||||
|
||||
func readSettings() {
|
||||
|
|
|
@ -344,9 +344,11 @@ func parseDownlinkReport(s string) {
|
|||
ti.tail = tail
|
||||
}
|
||||
|
||||
// This is a hack to show the source of the traffic in ForeFlight.
|
||||
if len(ti.tail) == 0 || (len(ti.tail) != 0 && len(ti.tail) < 8 && ti.tail[0] != 'U') {
|
||||
ti.tail = "u" + ti.tail
|
||||
if globalSettings.DEBUG {
|
||||
// This is a hack to show the source of the traffic in ForeFlight.
|
||||
if len(ti.tail) == 0 || (len(ti.tail) != 0 && len(ti.tail) < 8 && ti.tail[0] != 'U') {
|
||||
ti.tail = "u" + ti.tail
|
||||
}
|
||||
}
|
||||
|
||||
traffic[ti.icao_addr] = ti
|
||||
|
@ -494,8 +496,10 @@ func esListen() {
|
|||
|
||||
// This is a hack to show the source of the traffic in ForeFlight.
|
||||
ti.tail = strings.Trim(ti.tail, " ")
|
||||
if len(ti.tail) == 0 || (len(ti.tail) != 0 && len(ti.tail) < 8 && ti.tail[0] != 'E') {
|
||||
ti.tail = "e" + ti.tail
|
||||
if globalSettings.DEBUG {
|
||||
if len(ti.tail) == 0 || (len(ti.tail) != 0 && len(ti.tail) < 8 && ti.tail[0] != 'E') {
|
||||
ti.tail = "e" + ti.tail
|
||||
}
|
||||
}
|
||||
|
||||
traffic[icaoDec] = ti // Update information on this ICAO code.
|
||||
|
|
Ładowanie…
Reference in New Issue