26 lines
519 B
Go
26 lines
519 B
Go
package main
|
|
|
|
import (
|
|
"git.timovolkmann.de/gyrogpsc/dispatcher"
|
|
gnet "git.timovolkmann.de/gyrogpsc/net"
|
|
)
|
|
|
|
const (
|
|
TCP_PORT = ":3010"
|
|
HTTP_PORT = ":3011"
|
|
SERIAL_PORT = "/dev/tty.usbmodem14201"
|
|
)
|
|
|
|
func main() {
|
|
d := dispatcher.New()
|
|
collectRoutines(d)
|
|
gnet.NewHttpServer(d, HTTP_PORT)
|
|
}
|
|
|
|
func collectRoutines(d *dispatcher.Dispatcher) {
|
|
// collectRoutines Serial UBX Sensor Data
|
|
go gnet.SerialUbxCollector(d, SERIAL_PORT)
|
|
// collectRoutines TCP JSON Sensor Data
|
|
go gnet.TcpJsonCollector(d, TCP_PORT)
|
|
}
|