feat(companion): advert position precision (privacy)

Settings > Privacy > Precision: Exact / ~100 m / ~500 m / ~1 km, beside
"Position in adverts", which stays the on/off. With the position shared,
it is snapped to a fixed grid (0.0009 / 0.0045 / 0.009 degrees) rather
than jittered, so repeated adverts from one spot send the same value and
can't be averaged back to the exact fix.

A schema row (NodePrefs::advert_loc_prec), so both UIs show it, factory
reset clears it and the console has it as advert.loc.precision.

Every self-advert -- manual, flood, auto, the phone app's and contact
export -- now goes through MyMesh::createOwnAdvert(), so the precision
applies everywhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pmow
2026-10-10 16:22:16 -10:00
co-authored by Claude Opus 5.5
parent 2820c36b1c
commit a25df3ceec
6 changed files with 49 additions and 25 deletions
+4
View File
@@ -208,6 +208,10 @@ public:
void loop();
void handleCmdFrame(size_t len);
bool advert(); // zero-hop: only nodes in direct range hear it
// Self-advert honouring advert_loc_policy, with the coordinates snapped to
// advert_loc_prec's grid. Every advert this node builds goes through it
// (manual, flood, auto, phone-app and contact export).
mesh::Packet* createOwnAdvert();
bool advertFlood(); // flooded (default scope), as the app's "Advert" with flood
void sendNodeDiscoverReq();
void enterCLIRescue();