kopia lustrzana https://github.com/cyoung/stratux
set GOMAXPROCS to number of cores
rodzic
a408a8cf13
commit
58b26ad9d0
|
@ -3,12 +3,13 @@ package main
|
|||
import (
|
||||
"bufio"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// http://www.faa.gov/nextgen/programs/adsb/wsa/media/GDL90_Public_ICD_RevA.PDF
|
||||
|
@ -154,7 +155,6 @@ func makeOwnshipReport() bool {
|
|||
msg[9] = tmp[1] // Longitude.
|
||||
msg[10] = tmp[2] // Longitude.
|
||||
|
||||
|
||||
//TODO: 0xFFF "invalid altitude."
|
||||
//FIXME: This is **PRESSURE ALTITUDE**
|
||||
|
||||
|
@ -187,7 +187,6 @@ func makeOwnshipReport() bool {
|
|||
msg[15] = msg[15] | byte((verticalVelocity&0x0F00)>>8)
|
||||
msg[16] = byte(verticalVelocity & 0xFF)
|
||||
|
||||
|
||||
// Showing magnetic (corrected) on ForeFlight. Needs to be True Heading.
|
||||
groundTrack := uint16(0)
|
||||
if isGPSGroundTrackValid() {
|
||||
|
@ -307,7 +306,6 @@ func updateStatus() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
func parseInput(buf string) ([]byte, uint16) {
|
||||
x := strings.Split(buf, ";") // Discard everything after the first ';'.
|
||||
if len(x) == 0 {
|
||||
|
@ -428,7 +426,6 @@ func managementInterface() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
func defaultSettings() {
|
||||
globalSettings.UAT_Enabled = true //TODO
|
||||
globalSettings.ES_Enabled = false //TODO
|
||||
|
@ -474,6 +471,7 @@ func saveSettings() {
|
|||
}
|
||||
|
||||
func main() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU()) // redundent with Go v1.5+ compiler
|
||||
MsgLog = make([]msg, 0)
|
||||
|
||||
crcInit() // Initialize CRC16 table.
|
||||
|
|
Ładowanie…
Reference in New Issue