mirror of
https://github.com/acaloiaro/roam-location
synced 2026-07-21 10:12:21 +00:00
Move NMEA sentence parsing from the first to the second sentence received
This commit is contained in:
parent
1af4956990
commit
e61d2eeb1e
1 changed files with 4 additions and 1 deletions
|
|
@ -37,7 +37,10 @@ func Receive(dbPath string) {
|
|||
|
||||
func handlePacket(buf []byte, rlen int) {
|
||||
sentences := fmt.Sprintln(string(buf[0:rlen]))
|
||||
sentence := strings.Split(sentences, "\n")[0] // We're not concerned with the second sentence, yet
|
||||
|
||||
// Sierra wireless RV55 previously sent location data in the firest sentence, but has moved to
|
||||
// the second sentence. If this changes again, I'll need to debug the reason
|
||||
sentence := strings.Split(sentences, "\n")[1]
|
||||
s, err := nmea.Parse(sentence)
|
||||
if err != nil {
|
||||
// ignoring bad nmea sentence
|
||||
|
|
|
|||
Loading…
Reference in a new issue