Repository navigation
GPS: GPS_BAUD_PROBE_LIST as a build flag for any NmeaGpsDriver; enable on Station G2/G3 - #5
Closed
AlexandrTyshchenko wants to merge 1 commit into
Conversation
…e on Station G2/G3 The probe list was wired only in variants/promicro/target.cpp. It is now the default list of NmeaGpsDriver when GPS_BAUD_PROBE_LIST is set, so a variant enables baud autodetection with a build flag alone. Station G2 and G3 enable it: their Grove UART connector is used with M5Stack Unit GPS modules, which default to 115200.
|
This appears to be working on my G3 with M5Stack GPS 1.1 GROVE module. It hasn't gotten a fix, since I am indoors and GPS units typically can't get a fix in my computer room. But the various |
Owner
|
@AlexandrTyshchenko you should now directly do your PR against dev, as the GPS refactor PR has been merged today ! But looks good, thanks ! |
Author
|
Thanks @cwichura for testing and @fdlamotte for the review. Reopened against |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #3 (baud autodetect), as discussed with
@cwichurain meshcore-dev#3729.What
GPS_BAUD_PROBE_LISTis now handled inNmeaGpsDriver.hinstead ofvariants/promicro/target.cpp. When the flag is set, everyNmeaGpsDriverthat does not pass its own list gets it as the default, so a variant enables autodetection with only a build flag, notarget.cppchange.variants/promicro/target.cppgoes back to plainNmeaGpsDriver gps_driver(Serial1);(same behaviour as before).-D GPS_BAUD_PROBE_LIST=9600,115200,38400. Their Grove UART connector is commonly used with M5Stack Unit GPS modules, which default to 115200 and are not seen at the 9600 default.The explicit
NmeaGpsDriver(serial, probeBauds, count)constructor stays for boards that want their own list.Not done
Autodetection stays opt-in per variant. Turning it on for all boards by default would add up to ~2 s per wrong rate to GPS detection at boot, and nobody can test every board / GPS chip combination. Happy to change if you prefer opt-out.
Testing
Station_G3_ESP32_repeater,Station_G2_repeater,ProMicro_repeater,ProMicro_companion_radio_ble. The probe table is linked only where the flag is set (checked withnm).Station_G3_ESP32_companion_radio_bleis over the 1280K app partition, but already on the base commit544514f5(1326841 bytes; with this PR 1326849, +8 bytes). Not caused by this change.@cwichurawill test on Station G3 + M5Stack Unit GPS v1.1.