mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-23 09:06:02 +00:00
Add setting to transmit NeighborInfo over LoRa (#5286)
* Add setting to transmit NeighborInfo over LoRa Only if not using the default channel * Bump minimum broadcast interval for NeighborInfo to 4 hours
This commit is contained in:
parent
439c1dec08
commit
2c2213ef9b
@ -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"
|
||||
|
@ -121,7 +121,12 @@ Will be used for broadcast.
|
||||
*/
|
||||
int32_t NeighborInfoModule::runOnce()
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user