Skip to content

Comments

Refactor EnvironmentSensorManager to extract the RAK12500LocationProvider and simplify GPS init flow#1799

Open
alexsporn wants to merge 7 commits intomeshcore-dev:devfrom
alexsporn:feat/refactor-location-provider
Open

Refactor EnvironmentSensorManager to extract the RAK12500LocationProvider and simplify GPS init flow#1799
alexsporn wants to merge 7 commits intomeshcore-dev:devfrom
alexsporn:feat/refactor-location-provider

Conversation

@alexsporn
Copy link

This PR is the first step to simplify handling of custom LocationProvider implementations inside the different SensorManagers.

It extracts the RAK12500LocationProvider out of the EnvironmentSensorManager and moves the GPS init logic to each LocationProvider implementation.

It moves the GPS detection to the radio_init() and if found passes the correct LocationProvider to the used (Environment/Custom)SensorManager.
This allows for example the RAK4631 boards to have a cleaner detection and use of a single LocationProvider depending 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 SensorManager overrides (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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant