-
Notifications
You must be signed in to change notification settings - Fork 231
gps: improvements and corrections for config commands #834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
gps/ublox.go
Outdated
| nav5Cmd.DynModel = DynModeBike | ||
| nav5Cmd.FixMode = FixModeAuto | ||
| nav5Cmd.Put42Bytes(d.buffer[:]) | ||
| d.SendCommand(d.buffer[:42]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you return the SendCommend error? Here and everywhere else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically due to the fact that there is a constant stream of updates coming from NMEA messages, the results from sending any UBX commands are getting lost. Better to just ignore them for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized the problem was not that an error was being returned, even though that error might be not actually an error. My problem was that the code was stopping from sending subsequent commands on an error.
Now have improved the implementation to return error, and count on the caller to ignore/handle as needed.
Thanks for the feedback on that @soypat
This contains some improvements and corrections for the gps driver It adds some additional functions for different modes (automobile, bike, etc) and also ignores the return results from any config commands. Basically due to the fact that there is a constant stream of updates coming from NMEA messages, the results from sending any UBX commands are getting lost. Better to just ignore them for now. Signed-off-by: deadprogram <[email protected]>
9aba2c1 to
9bef89a
Compare
| GSA NMEASentenceType = "GSA" | ||
| GGA NMEASentenceType = "GGA" | ||
| GLL NMEASentenceType = "GLL" | ||
| GSV NMEASentenceType = "GSV" | ||
| RMC NMEASentenceType = "RMC" | ||
| VTG NMEASentenceType = "VTG" | ||
| ZDA NMEASentenceType = "ZDA" | ||
| TXT NMEASentenceType = "TXT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If these are not arguments or needed as user facing API I'd keep them internal, unexported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are needed in user apps.
This PR contains some improvements and corrections for the
gpsdriver. It adds some additional functions for different modes (automobile, bike, etc) and also ignores the return results from any config commands.Basically due to the fact that there is a constant stream of updates coming from NMEA messages, the results from sending any UBX commands are getting lost. Better to just ignore them for now.