-
Notifications
You must be signed in to change notification settings - Fork 940
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
Optimise GPS Baud Rate cycle #5102
Conversation
|
c8d942e
to
9656aa4
Compare
Previously, our baud rate cycled through one list twice. There were some rarer baudrates in there, so this code separates out those into a dedicated list that is only run through if detection fails for common bauds. We also only run through each baud rate once.
Would have always reset GPS baudrate every time.
6951852
to
3df4fa6
Compare
Beginning testing. |
|
1cdf6e4
to
74f1c6d
Compare
If GPS_BAUDRATE is set in variant.h, the deployer knows something we don't about the GPS. Used especially when the GPS is soldered to a board in a commercial product :) If we see that, we don't try other baud rates at all.
74f1c6d
to
3b265f5
Compare
OK, tested with 7 different GPSes across several devices and this works nicely. Ready for review. |
d1dcf8f
to
1d804f5
Compare
@fifieldt do we want to apply the GPS_BAUDRATE_FIXED macro to variants as a part of this PR as well? |
I don't think there's a need set GPS_BAUDRATE_FIXED directly in variant.h? Just adds work for hardware makers when setting GPS_BAUDRATE does the job. Or are you saying there are other variants to set baud rates for? |
I'm being a bonehead and the #ifdef GPS_BAUDRATE block in configuration.h sailed over my head. |
* Optimise GPS Baud Rate cycle Previously, our baud rate cycled through one list twice. There were some rarer baudrates in there, so this code separates out those into a dedicated list that is only run through if detection fails for common bauds. We also only run through each baud rate once. * Fix first time around bug Would have always reset GPS baudrate every time. * Add support for fixing GPS_BAUDRATE If GPS_BAUDRATE is set in variant.h, the deployer knows something we don't about the GPS. Used especially when the GPS is soldered to a board in a commercial product :) If we see that, we don't try other baud rates at all. * Don't print blank lines in GPS_DEBUG. * Try GPS_BAUDRATE first, not only. * Fix spelling mistakes in comments * Only use GPS_BAUDRATE if specified in variant.h * Modify RareSerial Speeds based on FIXED or not.
Previously, our baud rate cycled through one list twice.
There were some rarer baudrates in there, so this code separates out those into a dedicated list that is only run through if detection fails for common bauds. We also only run through each baud rate once.