Fix GPS coordinate consistency between mesh ping and API post#67
Merged
MrAlders0n merged 3 commits intodevfrom Dec 19, 2025
Merged
Fix GPS coordinate consistency between mesh ping and API post#67MrAlders0n merged 3 commits intodevfrom
MrAlders0n merged 3 commits intodevfrom
Conversation
- Add capturedPingCoords field to state to store GPS coordinates at ping time - Capture coordinates immediately when mesh ping is sent - Use stored coordinates for API post after 7-second listening window - Clear captured coordinates after API post completes - Ensure coordinates are cleared during cleanup Co-authored-by: MrAlders0n <55921894+MrAlders0n@users.noreply.github.com>
- Move coordinate clearing outside if-else block for consistency - Remove fallback to closure variables to prevent stale coordinates - Add critical error logging if coordinates are missing - Skip API post if coordinates unavailable to prevent incorrect data Co-authored-by: MrAlders0n <55921894+MrAlders0n@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix GPS coordinate synchronization between mesh ping and API post
Fix GPS coordinate consistency between mesh ping and API post
Dec 19, 2025
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.
GPS coordinates were not synchronized between mesh ping transmission and API post 7 seconds later. During the listening window, the GPS watch continuously updates
state.lastFix, causing API posts to use coordinates different from the original mesh ping.Changes
state.capturedPingCoordsto explicitly store coordinates at ping timeExample
Before: Closure variables could become stale during 7-second window
After: Explicit state capture ensures consistency
This guarantees mesh ping coordinates match API post coordinates regardless of GPS updates during the listening window.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.