boot adverts are now zero hop instead of flood

This commit is contained in:
liamcottle 2026-01-26 22:20:36 +13:00
parent 4b7684c7df
commit ed589f9620
11 changed files with 30 additions and 17 deletions

View file

@ -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!");
}