diff --git a/examples/simple_repeater/MyMesh.cpp b/examples/simple_repeater/MyMesh.cpp index 5fb1a729f..a76a5984a 100644 --- a/examples/simple_repeater/MyMesh.cpp +++ b/examples/simple_repeater/MyMesh.cpp @@ -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 diff --git a/examples/simple_room_server/MyMesh.cpp b/examples/simple_room_server/MyMesh.cpp index d18a802e8..d0d6acd85 100644 --- a/examples/simple_room_server/MyMesh.cpp +++ b/examples/simple_room_server/MyMesh.cpp @@ -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 diff --git a/src/helpers/CommonCLI.cpp b/src/helpers/CommonCLI.cpp index a3de990aa..b71da88b6 100644 --- a/src/helpers/CommonCLI.cpp +++ b/src/helpers/CommonCLI.cpp @@ -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();