mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
boot adverts are now zero hop instead of flood
This commit is contained in:
parent
4b7684c7df
commit
ed589f9620
11 changed files with 30 additions and 17 deletions
|
|
@ -854,10 +854,14 @@ bool MyMesh::formatFileSystem() {
|
|||
#endif
|
||||
}
|
||||
|
||||
void MyMesh::sendSelfAdvertisement(int delay_millis) {
|
||||
void MyMesh::sendSelfAdvertisement(int delay_millis, bool flood) {
|
||||
mesh::Packet *pkt = createSelfAdvert();
|
||||
if (pkt) {
|
||||
sendFlood(pkt, delay_millis);
|
||||
if (flood) {
|
||||
sendFlood(pkt, delay_millis);
|
||||
} else {
|
||||
sendZeroHop(pkt, delay_millis);
|
||||
}
|
||||
} else {
|
||||
MESH_DEBUG_PRINTLN("ERROR: unable to create advertisement packet!");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue