Compare commits

...

4 Commits

Author SHA1 Message Date
mattzzw
bb8063b469 CommonCLI.cpp: CommonCLI: Set limits for flood advert interval check to 12-48h 2025-12-15 11:24:11 +01:00
mattzzw
cc7a0c07ea Set repeater default lower limit flood_advert_interval to 12h, set room server default to 48h/12h min. 2025-12-14 19:56:34 +01:00
mattzzw
14c98d8cda Set lower limit of flood_advert_interval to 12h 2025-12-14 19:52:40 +01:00
mattzzw
69d19ea6ca Set default of flood_advert_interval to 48h
This should help reducing congestion/noise in big meshes.
2025-12-14 19:28:21 +01:00
3 changed files with 6 additions and 6 deletions

View File

@@ -697,7 +697,7 @@ MyMesh::MyMesh(mesh::MainBoard &board, mesh::Radio &radio, mesh::MillisecondCloc
_prefs.cr = LORA_CR;
_prefs.tx_power_dbm = LORA_TX_POWER;
_prefs.advert_interval = 1; // default to 2 minutes for NEW installs
_prefs.flood_advert_interval = 12; // 12 hours
_prefs.flood_advert_interval = 48; // 48 hours, minimum is 12h
_prefs.flood_max = 64;
_prefs.interference_threshold = 0; // disabled
@@ -787,7 +787,7 @@ void MyMesh::updateAdvertTimer() {
}
void MyMesh::updateFloodAdvertTimer() {
if (_prefs.flood_advert_interval > 0) { // schedule flood advert timer
if (_prefs.flood_advert_interval > 12) { // schedule flood advert timer, min. 12h
next_flood_advert = futureMillis(((uint32_t)_prefs.flood_advert_interval) * 60 * 60 * 1000);
} else {
next_flood_advert = 0; // stop the timer

View File

@@ -612,7 +612,7 @@ MyMesh::MyMesh(mesh::MainBoard &board, mesh::Radio &radio, mesh::MillisecondCloc
_prefs.tx_power_dbm = LORA_TX_POWER;
_prefs.disable_fwd = 1;
_prefs.advert_interval = 1; // default to 2 minutes for NEW installs
_prefs.flood_advert_interval = 12; // 12 hours
_prefs.flood_advert_interval = 48; // 48 hours
_prefs.flood_max = 64;
_prefs.interference_threshold = 0; // disabled
#ifdef ROOM_PASSWORD
@@ -692,7 +692,7 @@ void MyMesh::updateAdvertTimer() {
}
}
void MyMesh::updateFloodAdvertTimer() {
if (_prefs.flood_advert_interval > 0) { // schedule flood advert timer
if (_prefs.flood_advert_interval > 12) { // schedule flood advert timer
next_flood_advert = futureMillis(((uint32_t)_prefs.flood_advert_interval) * 60 * 60 * 1000);
} else {
next_flood_advert = 0; // stop the timer

View File

@@ -371,8 +371,8 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
strcpy(reply, "OK");
} else if (memcmp(config, "flood.advert.interval ", 22) == 0) {
int hours = _atoi(&config[22]);
if ((hours > 0 && hours < 3) || (hours > 48)) {
strcpy(reply, "Error: interval range is 3-48 hours");
if ((hours > 0 && hours < 12) || (hours > 48)) {
strcpy(reply, "Error: interval range is 12-48 hours");
} else {
_prefs->flood_advert_interval = (uint8_t)(hours);
_callbacks->updateFloodAdvertTimer();