feat: add periodic auto-advert with GPS position (Auto-Advert tool)

Adds configurable periodic 0-hop self-advert that includes GPS coordinates,
making the device's position visible in other nodes' Nearby Nodes screen.
Options: off / 1min / 2min / 5min / 10min / 30min / 1h.

Accessible via Tools → Auto-Advert. Timer runs in MyMesh::loop().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-14 16:08:33 +02:00
co-authored by Claude Sonnet 4.6
parent d59687647f
commit 09ac455806
8 changed files with 95 additions and 5 deletions
@@ -6,7 +6,7 @@ class ToolsScreen : public UIScreen {
UITask* _task;
int _sel;
static const int ITEM_COUNT = 3;
static const int ITEM_COUNT = 4;
static const char* ITEMS[ITEM_COUNT];
public:
@@ -42,11 +42,12 @@ public:
if (c == KEY_DOWN && _sel < ITEM_COUNT - 1) { _sel++; return true; }
if (c == KEY_CANCEL || c == KEY_CONTEXT_MENU) { _task->gotoHomeScreen(); return true; }
if (c == KEY_ENTER) {
if (_sel == 0) { _task->gotoRingtoneEditor(); return true; }
if (_sel == 1) { _task->gotoBotScreen(); return true; }
if (_sel == 2) { _task->gotoNearbyScreen(); return true; }
if (_sel == 0) { _task->gotoRingtoneEditor(); return true; }
if (_sel == 1) { _task->gotoBotScreen(); return true; }
if (_sel == 2) { _task->gotoNearbyScreen(); return true; }
if (_sel == 3) { _task->gotoAutoAdvertScreen(); return true; }
}
return false;
}
};
const char* ToolsScreen::ITEMS[3] = { "Ringtone Editor", "Auto-Reply Bot", "Nearby Nodes" };
const char* ToolsScreen::ITEMS[4] = { "Ringtone Editor", "Auto-Reply Bot", "Nearby Nodes", "Auto-Advert" };