Skip to content

Commit

Permalink
Version printing for logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyoung committed Sep 19, 2015
1 parent 10f21a6 commit f3a52e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ GOARM ?= 7

all:
# GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) go get -t -d -v ./...
GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) go build main/gen_gdl90.go main/traffic.go main/ry835ai.go main/network.go main/managementinterface.go main/sdr.go
GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) go build -ldflags "-X main.stratuxBuild=`git log -n 1 --pretty=%H`" main/gen_gdl90.go main/traffic.go main/ry835ai.go main/network.go main/managementinterface.go main/sdr.go

test:
sh -c true
Expand Down
6 changes: 4 additions & 2 deletions main/gen_gdl90.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ const (
TRACK_RESOLUTION = float32(360.0 / 256.0)
)

var stratuxBuild string

// CRC16 table generated to use to work with GDL90 messages.
var Crc16Table [256]uint16

Expand Down Expand Up @@ -586,6 +588,8 @@ func main() {
mfp := io.MultiWriter(fp, os.Stdout)
log.SetOutput(mfp)

log.Printf("Stratux %s (%s) starting.\n", stratuxVersion, stratuxBuild)

MsgLog = make([]msg, 0)

crcInit() // Initialize CRC16 table.
Expand Down Expand Up @@ -620,8 +624,6 @@ func main() {

initRY835AI()

//TODO: network stuff

// Start the heartbeat message loop in the background, once per second.
go heartBeatSender()
// Start the management interface.
Expand Down

0 comments on commit f3a52e9

Please sign in to comment.