Skip to content

Add 7-second delay to MeshMapper API posts after ping transmission#8

Merged
MrAlders0n merged 3 commits into
mainfrom
copilot/add-delay-to-api-post
Dec 17, 2025
Merged

Add 7-second delay to MeshMapper API posts after ping transmission#8
MrAlders0n merged 3 commits into
mainfrom
copilot/add-delay-to-api-post

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 17, 2025

The MeshMapper API posts need to occur 7 seconds after pings are sent to allow time for message propagation through the mesh network before comparison data is recorded.

Changes

  • Added MESHMAPPER_API_DELAY_MS constant (7000ms) to centralize timing configuration
  • Wrapped postToMeshMapperAPI() call in setTimeout() to defer execution
// Before: Immediate API post
postToMeshMapperAPI(lat, lon);

// After: Delayed API post
setTimeout(() => {
  postToMeshMapperAPI(lat, lon);
}, MESHMAPPER_API_DELAY_MS);

The fire-and-forget async pattern is preserved—ping transmission remains non-blocking.

Original prompt

In regard to Add automatic MeshMapper API posting on every ping #6

I actually need to delay the API post 7 seconds after the ping goes out on the meshcore network.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 17, 2025 18:56
Co-authored-by: MrAlders0n <55921894+MrAlders0n@users.noreply.github.com>
Co-authored-by: MrAlders0n <55921894+MrAlders0n@users.noreply.github.com>
Copilot AI changed the title [WIP] Add delay to automatic MeshMapper API posting Add 7-second delay to MeshMapper API posts after ping transmission Dec 17, 2025
Copilot AI requested a review from MrAlders0n December 17, 2025 18:59
@MrAlders0n MrAlders0n marked this pull request as ready for review December 17, 2025 19:00
@MrAlders0n MrAlders0n merged commit 728050d into main Dec 17, 2025
@MrAlders0n MrAlders0n deleted the copilot/add-delay-to-api-post branch December 18, 2025 01:38
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