mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-24 17:32:18 +00:00
Move NeighborInfo interval default to 6 hours (double NodeInfo) (#4483)
* Move NeighborInfo in line with NodeInfo * Set default to 6 hours and cap minimum at 2 hours
This commit is contained in:
parent
a577dd4142
commit
5ff1078c8c
@ -13,7 +13,9 @@
|
|||||||
#define default_min_wake_secs 10
|
#define default_min_wake_secs 10
|
||||||
#define default_screen_on_secs IF_ROUTER(1, 60 * 10)
|
#define default_screen_on_secs IF_ROUTER(1, 60 * 10)
|
||||||
#define default_node_info_broadcast_secs 3 * 60 * 60
|
#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_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 default_mqtt_address "mqtt.meshtastic.org"
|
#define default_mqtt_address "mqtt.meshtastic.org"
|
||||||
#define default_mqtt_username "meshdev"
|
#define default_mqtt_username "meshdev"
|
||||||
|
@ -557,6 +557,10 @@ void AdminModule::handleSetModuleConfig(const meshtastic_ModuleConfig &c)
|
|||||||
case meshtastic_ModuleConfig_neighbor_info_tag:
|
case meshtastic_ModuleConfig_neighbor_info_tag:
|
||||||
LOG_INFO("Setting module config: Neighbor Info\n");
|
LOG_INFO("Setting module config: Neighbor Info\n");
|
||||||
moduleConfig.has_neighbor_info = true;
|
moduleConfig.has_neighbor_info = true;
|
||||||
|
if (moduleConfig.neighbor_info.update_interval < min_neighbor_info_broadcast_secs) {
|
||||||
|
LOG_DEBUG("Tried to set update_interval too low, setting to %d\n", default_neighbor_info_broadcast_secs);
|
||||||
|
moduleConfig.neighbor_info.update_interval = default_neighbor_info_broadcast_secs;
|
||||||
|
}
|
||||||
moduleConfig.neighbor_info = c.payload_variant.neighbor_info;
|
moduleConfig.neighbor_info = c.payload_variant.neighbor_info;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_detection_sensor_tag:
|
case meshtastic_ModuleConfig_detection_sensor_tag:
|
||||||
|
@ -120,8 +120,7 @@ int32_t NeighborInfoModule::runOnce()
|
|||||||
if (airTime->isTxAllowedChannelUtil(true) && airTime->isTxAllowedAirUtil()) {
|
if (airTime->isTxAllowedChannelUtil(true) && airTime->isTxAllowedAirUtil()) {
|
||||||
sendNeighborInfo(NODENUM_BROADCAST, false);
|
sendNeighborInfo(NODENUM_BROADCAST, false);
|
||||||
}
|
}
|
||||||
return Default::getConfiguredOrDefaultMsScaled(moduleConfig.neighbor_info.update_interval, default_broadcast_interval_secs,
|
return Default::getConfiguredOrDefault(moduleConfig.neighbor_info.update_interval, default_neighbor_info_broadcast_secs);
|
||||||
numOnlineNodes);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user