mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-06 20:26:12 +00:00
feat(nodes): on-device add/delete/favourite + circular filter tabs, rename to "Nodes"
Turn Nearby Nodes into the single node hub and make its navigation legible. Node management (no phone app needed): - MyMesh gains addDiscoveredContact() and deleteContactByKey(); CMD_REMOVE_CONTACT now reuses deleteContactByKey() (one delete path: contact + blob + room password + UI cleanup + lazy write). - Action menu (Hold Enter) gains Add contact (a new scanned node), Favourite / Unfavourite (pin to the first free dial slot), and Delete contact (confirm first, defaults to Cancel). Actions are offered contextually per row. - A pinned contact shows a star in the list row, next to any live-share diamond. Absorb passively-heard adverts: refreshStored() folds getRecentlyHeard() nodes that aren't already listed as name+age rows (All filter only — AdvertPath has no type), so "recently heard" no longer needs its own page. Legible filter navigation: the filter (LEFT/RIGHT) is now a visible tab strip — the active filter is a centred inverted pill, neighbours fan out and wrap around (circular, first<->last). Only whole tabs are drawn so labels never wrap a line. Rename Tools > "Nearby Nodes" to "Nodes". Both solo envs build green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -111,6 +111,11 @@ public:
|
||||
int getRecentlyHeard(AdvertPath dest[], int max_num);
|
||||
int getDiscoverResults(DiscoverResult dest[], int max_count);
|
||||
|
||||
// On-device contact management — lets Nearby Nodes add a discovered node or
|
||||
// delete a contact without the phone app. Mirrors the CMD_ADD/REMOVE paths.
|
||||
bool addDiscoveredContact(const uint8_t* pub_key, const char* name, uint8_t type);
|
||||
bool deleteContactByKey(const uint8_t* pub_key);
|
||||
|
||||
// Ping/Trace functionality
|
||||
#define PING_RESULT_MAX 4
|
||||
typedef void (*PingCallback)(uint32_t tag, int16_t snr_out_x4, int16_t snr_back_x4, uint32_t rtt_ms);
|
||||
|
||||
Reference in New Issue
Block a user