diff --git a/src/mesh/Default.h b/src/mesh/Default.h index 7a7507c84e..d39886d1c3 100644 --- a/src/mesh/Default.h +++ b/src/mesh/Default.h @@ -19,7 +19,7 @@ #define default_node_info_broadcast_secs 3 * 60 * 60 #define default_neighbor_info_broadcast_secs 6 * 60 * 60 #define min_node_info_broadcast_secs 60 * 60 // No regular broadcasts of more than once an hour -#define min_neighbor_info_broadcast_secs 2 * 60 * 60 +#define min_neighbor_info_broadcast_secs 4 * 60 * 60 #define default_mqtt_address "mqtt.meshtastic.org" #define default_mqtt_username "meshdev" diff --git a/src/modules/NeighborInfoModule.cpp b/src/modules/NeighborInfoModule.cpp index e7160f929f..fb658421d7 100644 --- a/src/modules/NeighborInfoModule.cpp +++ b/src/modules/NeighborInfoModule.cpp @@ -121,7 +121,12 @@ Will be used for broadcast. */ int32_t NeighborInfoModule::runOnce() { - sendNeighborInfo(NODENUM_BROADCAST_NO_LORA, false); + if (moduleConfig.neighbor_info.transmit_over_lora && !channels.isDefaultChannel(channels.getPrimaryIndex()) && + airTime->isTxAllowedChannelUtil(true) && airTime->isTxAllowedAirUtil()) { + sendNeighborInfo(NODENUM_BROADCAST, false); + } else { + sendNeighborInfo(NODENUM_BROADCAST_NO_LORA, false); + } return Default::getConfiguredOrDefaultMs(moduleConfig.neighbor_info.update_interval, default_neighbor_info_broadcast_secs); }