Skip to content

Preserve Coordinates with contact.copyWith() function#339

Merged
zjs81 merged 1 commit into
zjs81:mainfrom
ericszimmermann:ez_fix_coordinates
Apr 7, 2026
Merged

Preserve Coordinates with contact.copyWith() function#339
zjs81 merged 1 commit into
zjs81:mainfrom
ericszimmermann:ez_fix_coordinates

Conversation

@ericszimmermann

Copy link
Copy Markdown
Contributor

Previously, the merge only preserved path override fields and could overwrite existing GPS with null when the incoming frame had 0,0 coordinates. Now it also preserves prior coordinates when the incoming update omits location.
Should address Issue #336.

…verwrite existing GPS with null when the incoming frame had 0,0 coordinates.

Now it also preserves prior coordinates when the incoming update omits location.
Copilot AI review requested due to automatic review settings April 5, 2026 12:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates contact refresh merging logic in MeshCoreConnector to prevent previously known GPS coordinates from being cleared when an incoming contact frame omits location (encoded by the firmware as 0,0, which parses to null).

Changes:

  • Preserve existing latitude/longitude when the refreshed Contact has null coordinates.
  • Update the inline comment to reflect that both path override settings and GPS coordinates are preserved on refresh.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zjs81

zjs81 commented Apr 7, 2026

Copy link
Copy Markdown
Owner

Thank you

@zjs81 zjs81 merged commit 1a4fd1b into zjs81:main Apr 7, 2026
9 of 10 checks passed
@ericszimmermann ericszimmermann deleted the ez_fix_coordinates branch April 7, 2026 09:05
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.

3 participants