Skip to content

Commit 91bcf07

Browse files
authored
Tweak interval trottling (meshtastic#7113)
1 parent 4802cef commit 91bcf07

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/mesh/Default.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,17 @@ class Default
6161
throttlingFactor = 0.04;
6262
else if (config.lora.use_preset && config.lora.modem_preset == meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST)
6363
throttlingFactor = 0.02;
64-
else if (config.lora.use_preset && config.lora.modem_preset == meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW)
65-
throttlingFactor = 0.01;
6664
else if (config.lora.use_preset &&
6765
IS_ONE_OF(config.lora.modem_preset, meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST,
68-
meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO))
69-
return 1.0; // Don't bother throttling for highest bandwidth presets
66+
meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO,
67+
meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW))
68+
throttlingFactor = 0.01;
69+
70+
#if USERPREFS_EVENT_MODE
71+
// If we are in event mode, scale down the throttling factor
72+
throttlingFactor = 0.04;
73+
#endif
74+
7075
// Scaling up traffic based on number of nodes over 40
7176
int nodesOverForty = (numOnlineNodes - 40);
7277
return 1.0 + (nodesOverForty * throttlingFactor); // Each number of online node scales by 0.075 (default)

0 commit comments

Comments
 (0)