This commit is contained in:
Tom Fifield 2025-07-29 21:07:22 +10:00 committed by GitHub
commit 6474dc5af2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -105,14 +105,15 @@ void NeighborInfoModule::sendNeighborInfo(NodeNum dest, bool wantReplies)
{ {
meshtastic_NeighborInfo neighborInfo = meshtastic_NeighborInfo_init_zero; meshtastic_NeighborInfo neighborInfo = meshtastic_NeighborInfo_init_zero;
collectNeighborInfo(&neighborInfo); collectNeighborInfo(&neighborInfo);
meshtastic_MeshPacket *p = allocDataProtobuf(neighborInfo); // only send neighbours if we have some to send
// send regardless of whether or not we have neighbors in our DB, if (neighborInfo.neighbors_count > 0) {
// because we want to get neighbors for the next cycle meshtastic_MeshPacket *p = allocDataProtobuf(neighborInfo);
p->to = dest; p->to = dest;
p->decoded.want_response = wantReplies; p->decoded.want_response = wantReplies;
p->priority = meshtastic_MeshPacket_Priority_BACKGROUND; p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;
printNeighborInfo("SENDING", &neighborInfo); printNeighborInfo("SENDING", &neighborInfo);
service->sendToMesh(p, RX_SRC_LOCAL, true); service->sendToMesh(p, RX_SRC_LOCAL, true);
}
} }
/* /*