-
Notifications
You must be signed in to change notification settings - Fork 964
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
Make Ublox code more readable #4727
Conversation
|
The u-blox code and the GPS init code in general can use some sprucing up. A while ago I did a slash/hack on the u-blox identifying code, it worked for v6/v7/M8/M10, and actually reduced the overall code size. Time flies and sheep happens, never got around to doing a PR, and it bit rotted with the many changes and new parts that are now supported. I am not a programmer and welcome insights from folks that actually know what they are doing. I'm a hardware guy I've been doing u-blox stuff since the Neo-7 was a brand new part, and fiddling with GPS since the mid 90s. I would like to explore the possibility of changing the probing so that there could be a: That would keep the existing probing ability but allow individual platforms to pre-define a GNSS Model to reduce the code footprint as well as probe time. What do you think? |
Thanks, yeah, one of my hopes for this patch was that it would also make it easier for GPS experts who are not necessarily coders to wrangle the public messages. On the probe code, certainly room to do more :) For example there are probably some variants that have a ublox soldered on them that could save a lot of time if baudate 384000 was set in variant.h .Saving that for a different patch though! |
95193ef
to
9eeb79c
Compare
I've tested this on Ublox 6 and it works the same as before the patch, which was the aim! |
9eeb79c
to
16a33ab
Compare
Looks good. Let's merge this one after we cut a 2.5.1 release |
1e7d17f
to
37b7a91
Compare
Ublox comes in a myriad of versions and settings. Presently our configuration code does a lot of branching based on versions being or not being present. This patch adds version detection earlier in the piece and branches on the set gnssModel instead to create separate setup methods for Ublox 6, Ublox 7/8/9, and Ublox10. Additionally, adds a macro to make the code much shorter and more readable.
37b7a91
to
788b41a
Compare
* Simplify Ublox code Ublox comes in a myriad of versions and settings. Presently our configuration code does a lot of branching based on versions being or not being present. This patch adds version detection earlier in the piece and branches on the set gnssModel instead to create separate setup methods for Ublox 6, Ublox 7/8/9, and Ublox10. Additionally, adds a macro to make the code much shorter and more readable. * Make trunk happy * Make trunk happy --------- Co-authored-by: Ben Meadors <[email protected]>
Ublox GNSS chips comes in a myriad of versions and settings. Presently our configuration code treats all of Ublox as a monolith and in one long function does a lot of branching based on versions.
This patch:
The objective of these changes was to make the code much shorter and more readable.