Refactor EnvironmentSensorManager to extract the RAK12500LocationProvider and simplify GPS init flow#1799
Open
alexsporn wants to merge 7 commits intomeshcore-dev:devfrom
Open
Conversation
…the LocationProviders Introduce a RAK12500LocationProvider which also supports updating the RTC On RAK4631 boards now both the RAK12500 and the Serial GPS are fully supported
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.
This PR is the first step to simplify handling of custom
LocationProviderimplementations inside the different SensorManagers.It extracts the
RAK12500LocationProviderout of theEnvironmentSensorManagerand moves the GPS init logic to eachLocationProviderimplementation.It moves the GPS detection to the
radio_init()and if found passes the correctLocationProviderto the used(Environment/Custom)SensorManager.This allows for example the RAK4631 boards to have a cleaner detection and use of a single
LocationProviderdepending if a serial or a RAK12500 GPS module is used.If this work is received positively further work can be done to simplify the whole
SensorManageroverrides (custom e.g. T1000-E begin/stop calls) and the NMEA location handling. It would also make it much easier to add custom GPS sleep/wake instead of just start/stop for boards that support it.I am in the process of testing this PR with as much hardware that I have, but would appreciate early feedback from the core devs.