Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Thanks to Susmita for pointing these things out even after I merged!
  • Loading branch information
penguinland authored Jul 19, 2024
1 parent 245ecf6 commit ecea19b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions components/movementsensor/gpsrtk/gpsrtk.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (g *gpsrtk) getStream() (*rtcm3.Scanner, error) {
}
streamSource = g.vrs.GetReaderWriter()
} else {
g.logger.Debug("connecting to NTRIP stream........")
g.logger.Debug("connecting to NTRIP stream from static mount point...")
var err error
streamSource, err = g.ntripClient.GetStreamFromMountPoint(g.cancelCtx, g.logger)
if err != nil {
Expand All @@ -142,17 +142,15 @@ func (g *gpsrtk) receiveAndWriteCorrectionData() {

err := g.connectAndParseSourceTable()
if err != nil {
g.err.Set(err)
g.logger.Error("unable to parse source table! Giving up on RTK messages")
g.logger.Errorf("unable to parse source table! Aborting: %w", err)
return
}

// While we're supposed to keep running, (re)connect to the caster.
for !g.isClosed && g.cancelCtx.Err() == nil {
scanner, err := g.getStream()
if err != nil {
g.err.Set(err)
g.logger.Error("unable to get NTRIP stream! Giving up on RTK messages")
g.logger.Errorf("unable to get NTRIP stream! Aborting: %w", err)
return
}

Expand Down
2 changes: 1 addition & 1 deletion components/movementsensor/gpsutils/ntrip.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ func (n *NtripInfo) GetStreamFromMountPoint(

rc, err = n.client.GetStream(n.MountPoint)
if err == nil { // Success!
logger.Debug("Connected to stream")
n.stream = rc
logger.Debug("Connected to stream")
return rc, nil
}
}
Expand Down

0 comments on commit ecea19b

Please sign in to comment.