Skip to content

Add isGPSDetected() capability probe to SensorManager - #3390

Merged
oltaco merged 1 commit into
meshcore-dev:devfrom
jbrazio:feature/is-gps-detected
Sep 14, 2026
Merged

oltaco merged 1 commit into
meshcore-dev:devfrom
jbrazio:feature/is-gps-detected

Conversation

@jbrazio

@jbrazio jbrazio commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

ENV_INCLUDE_GPS says a build can have GPS. It says nothing about whether one is actually attached, and there is no way for the app to ask.

Adds a virtual isGPSDetected() to SensorManager, returning false by default, overridden in EnvironmentSensorManager to return its existing gps_detected flag. Builds without GPS keep the default.

Lets applications know whether a GPS was actually detected
(EnvironmentSensorManager reports its gps_detected state), e.g. to
hide GPS-dependent UI when no receiver is attached.
@oltaco

oltaco commented Sep 14, 2026

Copy link
Copy Markdown
Member

Looks good to me, and I think it would give us a cleaner way to do #3391 and could also help solve the issue raised here #3391 (comment)

@oltaco oltaco self-assigned this Sep 14, 2026
@oltaco
oltaco merged commit 6b2c354 into meshcore-dev:dev Sep 14, 2026
14 of 15 checks passed
@jbrazio
jbrazio deleted the feature/is-gps-detected branch September 14, 2026 13:22
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.

2 participants