mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 02:02:23 +00:00
Scale default intervals based for *online* mesh size past 40 nodes (#4277)
* Add congestion scaling coefficient * Added active mesh sized based interval scaling * Moved back to bottom * Format * Add observers and use correct number of online nodes
This commit is contained in:
@@ -145,8 +145,9 @@ int32_t EnvironmentTelemetryModule::runOnce()
|
||||
|
||||
uint32_t now = millis();
|
||||
if (((lastSentToMesh == 0) ||
|
||||
((now - lastSentToMesh) >= Default::getConfiguredOrDefaultMs(moduleConfig.telemetry.environment_update_interval,
|
||||
default_telemetry_broadcast_interval_secs))) &&
|
||||
((now - lastSentToMesh) >=
|
||||
Default::getConfiguredOrDefaultMsScaled(moduleConfig.telemetry.environment_update_interval,
|
||||
default_telemetry_broadcast_interval_secs, numOnlineNodes))) &&
|
||||
airTime->isTxAllowedChannelUtil(config.device.role != meshtastic_Config_DeviceConfig_Role_SENSOR) &&
|
||||
airTime->isTxAllowedAirUtil()) {
|
||||
sendTelemetry();
|
||||
|
||||
Reference in New Issue
Block a user