Refactor GPS management out of EnvironmentSensorManager into LocationProvider hierarchy#1799
Open
alexsporn wants to merge 1 commit intomeshcore-dev:devfrom
Open
Refactor GPS management out of EnvironmentSensorManager into LocationProvider hierarchy#1799alexsporn wants to merge 1 commit intomeshcore-dev:devfrom
alexsporn wants to merge 1 commit intomeshcore-dev:devfrom
Conversation
040de86 to
41a6231
Compare
…Provider hierarchy
Move all GPS lifecycle management (detection, start/stop, coordinate updates,
settings) from EnvironmentSensorManager into the SensorManager base class,
making GPS support available to any SensorManager subclass via
registerLocationProvider().
New LocationProvider subclasses:
- L76KLocationProvider: Quectel L76K with PCAS command configuration
- RAK12500LocationProvider: WisBlock I2C GPS module (u-blox)
Variant-specific GPS providers refactored:
- T1000-E: AG3335 with PAIR commands, backup mode sleep/wake
- Heltec Tracker: UC6580 with custom enable/reset pin handling
- Nano G2 Ultra: migrated from inline GPS code to MicroNMEALocationProvider
Removed 5 redundant SensorManager subclasses (HWTSensorManager,
SolarSensorManager, MASensorManager, NanoG2UltraSensorManager,
ThinkNodeM1SensorManager) that only existed to duplicate GPS management.
MicroNMEALocationProvider improvements:
- Configurable enable/standby/reset pin control with per-chip polarity
- Hardware standby support for low-power GPS sleep
- Subclass hooks: configure() for chip-specific NMEA setup, beginSerial()
for platform-specific serial init
- Shared detect() with ENV_SKIP_GPS_DETECT bypass
41a6231 to
728f0ac
Compare
Author
|
Discussion here: #1895 |
robekl
reviewed
Mar 3, 2026
| MESH_DEBUG_PRINTLN("RAK12500: begin (cold start)"); | ||
| powerOn(); | ||
| delay(500); | ||
| configureGNSS(); |
There was a problem hiding this comment.
the return value of configureGNSS() is ignored and _active is set to true below. If GNSS init fails transiently, the provider enters active mode and keeps polling a non-initialized device
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.
Move all GPS lifecycle management (detection, start/stop, coordinate updates,
settings) from
EnvironmentSensorManagerinto theSensorManagerbase class,making GPS support available to any
SensorManagersubclass viaregisterLocationProvider().New LocationProvider subclasses:
L76KLocationProvider: Quectel L76K withPCAScommand configurationRAK12500LocationProvider: WisBlock I2C GPS module (u-blox)Variant-specific GPS providers refactored:
PAIRcommands, backup mode sleep/wakeRemoved 5 redundant
SensorManagersubclasses (HWTSensorManager,SolarSensorManager,MASensorManager,NanoG2UltraSensorManager,ThinkNodeM1SensorManager) that only existed to duplicate GPS management.MicroNMEALocationProviderimprovements:configure()for chip-specific NMEA setup, beginSerial()for platform-specific serial init
detect()withENV_SKIP_GPS_DETECTbypass