added build flag to enable/disable boot advert

This commit is contained in:
liamcottle
2026-01-26 22:39:39 +13:00
parent ed589f9620
commit d13bc446de
5 changed files with 9 additions and 0 deletions

View File

@@ -88,7 +88,9 @@ void setup() {
#endif #endif
// send out initial zero hop Advertisement to the mesh // send out initial zero hop Advertisement to the mesh
#if ENABLE_ADVERT_ON_BOOT == 1
the_mesh.sendSelfAdvertisement(16000, false); the_mesh.sendSelfAdvertisement(16000, false);
#endif
} }
void loop() { void loop() {

View File

@@ -77,7 +77,9 @@ void setup() {
#endif #endif
// send out initial zero hop Advertisement to the mesh // send out initial zero hop Advertisement to the mesh
#if ENABLE_ADVERT_ON_BOOT == 1
the_mesh.sendSelfAdvertisement(16000, false); the_mesh.sendSelfAdvertisement(16000, false);
#endif
} }
void loop() { void loop() {

View File

@@ -582,7 +582,9 @@ void setup() {
the_mesh.showWelcome(); the_mesh.showWelcome();
// send out initial Advertisement to the mesh // send out initial Advertisement to the mesh
#if ENABLE_ADVERT_ON_BOOT == 1
the_mesh.sendSelfAdvert(1200); // add slight delay the_mesh.sendSelfAdvert(1200); // add slight delay
#endif
} }
void loop() { void loop() {

View File

@@ -111,7 +111,9 @@ void setup() {
#endif #endif
// send out initial zero hop Advertisement to the mesh // send out initial zero hop Advertisement to the mesh
#if ENABLE_ADVERT_ON_BOOT == 1
the_mesh.sendSelfAdvertisement(16000, false); the_mesh.sendSelfAdvertisement(16000, false);
#endif
} }
void loop() { void loop() {

View File

@@ -27,6 +27,7 @@ build_flags = -w -DNDEBUG -DRADIOLIB_STATIC_ONLY=1 -DRADIOLIB_GODMODE=1
-D LORA_FREQ=869.525 -D LORA_FREQ=869.525
-D LORA_BW=250 -D LORA_BW=250
-D LORA_SF=11 -D LORA_SF=11
-D ENABLE_ADVERT_ON_BOOT=1
-D ENABLE_PRIVATE_KEY_IMPORT=1 ; NOTE: comment these out for more secure firmware -D ENABLE_PRIVATE_KEY_IMPORT=1 ; NOTE: comment these out for more secure firmware
-D ENABLE_PRIVATE_KEY_EXPORT=1 -D ENABLE_PRIVATE_KEY_EXPORT=1
-D RADIOLIB_EXCLUDE_CC1101=1 -D RADIOLIB_EXCLUDE_CC1101=1