Skip to content

Add informSearchFailed method to update GPS power state handling#10394

Merged
thebentern merged 1 commit intomasterfrom
fix-gps-powerdown
May 5, 2026
Merged

Add informSearchFailed method to update GPS power state handling#10394
thebentern merged 1 commit intomasterfrom
fix-gps-powerdown

Conversation

@thebentern
Copy link
Copy Markdown
Contributor

No description provided.

@thebentern thebentern requested review from Copilot and jp-bennett May 5, 2026 15:06
@thebentern thebentern added the bugfix Pull request that fixes bugs label May 5, 2026
@github-actions github-actions Bot added the needs-review Needs human review label May 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines GPS search-cycle bookkeeping so the scheduler can distinguish between a successful fix and a search timeout, improving subsequent GPS power-state decisions.

Changes:

  • Add GPSUpdateScheduling::informSearchFailed() to record the end of a search that timed out without updating the lock-time prediction.
  • Update GPS::down() to call informGotLock() only when a valid location was obtained, otherwise call informSearchFailed().
  • Minor comment updates to reflect the “lock or timeout” semantics of GPS::down().

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/gps/GPSUpdateScheduling.h Declares the new informSearchFailed() API for timeout-ended search cycles.
src/gps/GPSUpdateScheduling.cpp Implements informSearchFailed() to mark searchEndedMs without modifying the lock-time prediction.
src/gps/GPS.cpp Routes GPS::down() scheduling updates through success vs timeout paths based on hasValidLocation.

@thebentern thebentern merged commit 603cce2 into master May 5, 2026
74 checks passed
@thebentern thebentern deleted the fix-gps-powerdown branch May 5, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes bugs needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants