mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-30 02:15:41 +00:00
Merge 04393e144c
into b5a8e8f51b
This commit is contained in:
commit
705e9cc2a7
@ -106,12 +106,13 @@ 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);
|
meshtastic_MeshPacket *p = allocDataProtobuf(neighborInfo);
|
||||||
// send regardless of whether or not we have neighbors in our DB,
|
|
||||||
// because we want to get neighbors for the next cycle
|
|
||||||
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);
|
// only send neighbours if we have some to send
|
||||||
|
if (neighborInfo.neighbors_count > 0) {
|
||||||
|
printNeighborInfo("SENDING", &neighborInfo);
|
||||||
|
}
|
||||||
service->sendToMesh(p, RX_SRC_LOCAL, true);
|
service->sendToMesh(p, RX_SRC_LOCAL, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user