changed serial read behavior
This commit is contained in:
parent
b03d7fcfa2
commit
d16dd61863
@ -8,7 +8,7 @@ import (
|
||||
const (
|
||||
TCP_PORT = ":3010"
|
||||
HTTP_PORT = ":3011"
|
||||
SERIAL_PORT = "COM4"
|
||||
SERIAL_PORT = "/dev/tty.usbmodem14201"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@ -75,6 +75,7 @@ func SerialCollector(proc Processor, serialPort string) {
|
||||
if err != nil {
|
||||
log.Fatalln(err.Error())
|
||||
}
|
||||
defer port.Close()
|
||||
|
||||
decoder := ublox.NewDecoder(port)
|
||||
|
||||
@ -84,8 +85,8 @@ func SerialCollector(proc Processor, serialPort string) {
|
||||
if err.Error() == "NMEA not implemented" {
|
||||
continue
|
||||
}
|
||||
log.Println(err)
|
||||
continue
|
||||
log.Println("serial read err:", err)
|
||||
break
|
||||
}
|
||||
sd, err := ConvertUbxToSensorData(meas)
|
||||
if err != nil {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user