changed serial read behavior

This commit is contained in:
Timo Volkmann 2020-12-10 13:20:20 +01:00
parent b03d7fcfa2
commit d16dd61863
2 changed files with 4 additions and 3 deletions

View File

@ -8,7 +8,7 @@ import (
const (
TCP_PORT = ":3010"
HTTP_PORT = ":3011"
SERIAL_PORT = "COM4"
SERIAL_PORT = "/dev/tty.usbmodem14201"
)
func main() {

View File

@ -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 {