add ability to remove neighbour via cli

This commit is contained in:
liamcottle 2025-08-25 23:45:50 +12:00
parent 08b49c3ac5
commit 2d5016bac3
3 changed files with 23 additions and 0 deletions

View file

@ -719,6 +719,17 @@ public:
*dp = 0; // null terminator
}
void removeNeighbor(const uint8_t* pubkey, int key_len) override {
#if MAX_NEIGHBOURS
for (int i = 0; i < MAX_NEIGHBOURS; i++) {
NeighbourInfo* neighbour = &neighbours[i];
if(memcmp(neighbour->id.pub_key, pubkey, key_len) == 0){
neighbours[i] = {}; // clear neighbour entry
}
}
#endif
}
mesh::LocalIdentity& getSelfId() override { return self_id; }
void clearStats() override {