Skip to content

[codex] parse contact locations from adverts#143

Merged
hermes-gadget merged 1 commit into
hermes-gadget:devfrom
n30nex:codex/contact-advert-locations
May 26, 2026
Merged

[codex] parse contact locations from adverts#143
hermes-gadget merged 1 commit into
hermes-gadget:devfrom
n30nex:codex/contact-advert-locations

Conversation

@n30nex
Copy link
Copy Markdown
Contributor

@n30nex n30nex commented May 26, 2026

Summary

Fixes #142.

  • Store remote contact GPS location state from MeshCore adverts when latitude/longitude are present.
  • Expose has_location, latitude, and longitude through ContactInfo / exportContactsFull() for future map markers and contact detail UI.
  • Clear stale location state when a later advert omits coordinates.
  • Add native coverage for the exported API fields and contact location update behavior.

Testing

Testing method: native tests only; hardware/firmware build still needs maintainer validation.

  • git diff --check
  • uvx --from platformio platformio test -e native_test -f test_mesh_wrapper -v: 18/18 passed
  • uvx --from platformio platformio test -e native_test -f test_mesh_messaging -v: 28/28 passed
  • uvx --from platformio platformio test -e native_test -v: 278 passed, 1 expected native skip

Notes

I attempted uvx --from platformio platformio run -e SlopOS_TDeck, but the fresh ESP32 build stayed CPU-active inside SCons dependency analysis for an extended period with no compile output, so I stopped it rather than treating it as a reliable validation result.

Checklist

  • pio test -e native_test -v passes
  • pio run -e SlopOS_TDeck builds
  • No new warnings or errors from completed checks
  • docs/KNOWN_ISSUES.md updated (not applicable)

Copy link
Copy Markdown
Owner

@hermes-gadget hermes-gadget left a comment

Choose a reason for hiding this comment

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

Code review: ✅ Approved

Changes

  • Adds , , fields to and
  • Parses lat/lon from adverts when present; clears when omitted in later adverts (prevents stale data)
  • Exports through for future UI use
  • 45 lines of new tests covering store, clear-on-update, and struct field access

Verification

  • 278/278 native tests passed (+1 expected skip)
  • Firmware builds clean (59.9% RAM, 18.6% Flash)
  • Version fix applied — branch had from fork drift, noted for post-merge cleanup
  • No new warnings

Notes

  • Clean additive change (79 additions, 0 deletions)
  • Lambda avoids duplication across 3 call sites
  • One minor: version regressed to — I'll fix on dev after merge

Copy link
Copy Markdown
Owner

@hermes-gadget hermes-gadget left a comment

Choose a reason for hiding this comment

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

Code review: ✅ Approved

Changes

  • Adds has_location, latitude, longitude fields to SlopContact and ContactInfo
  • Parses lat/lon from adverts when present; clears when omitted in later adverts (prevents stale data)
  • Exports through exportContactsFull() for future UI use
  • 45 lines of new tests covering store, clear-on-update, and struct field access

Verification

  • ✅ 278/278 native tests passed (+1 expected skip)
  • ✅ Firmware builds clean (59.9% RAM, 18.6% Flash)
  • ✅ Version fix applied — branch had beta-0.1.32 from fork drift, noted for post-merge cleanup
  • ✅ No new warnings

Notes

  • Clean additive change (79 additions, 0 deletions)
  • Lambda update_location avoids duplication across 3 call sites
  • One minor: version regressed to beta-0.1.32 — I'll fix on dev after merge

@hermes-gadget hermes-gadget marked this pull request as ready for review May 26, 2026 23:50
@hermes-gadget hermes-gadget merged commit 9a68051 into hermes-gadget:dev May 26, 2026
1 check passed
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.

Add contact GPS location parsing from adverts

2 participants