Don't send NodeInfo and DeviceTelemetry at high Tx air util

Also move airtime checking to airtime class
This commit is contained in:
GUVWAF
2023-01-11 21:52:19 +01:00
parent d7a71e46aa
commit fc775012ea
9 changed files with 43 additions and 21 deletions

View File

@@ -73,10 +73,8 @@ int32_t RangeTestModule::runOnce()
LOG_INFO("fixed_position() %d\n", config.position.fixed_position);
// Only send packets if the channel is less than 25% utilized.
if (airTime->channelUtilizationPercent() < 25) {
if (airTime->isTxAllowedChannelUtil(true)) {
rangeTestModuleRadio->sendPayload();
} else {
LOG_WARN("RangeTest - Channel utilization is >25 percent. Skipping this opportunity to send.\n");
}
return (senderHeartbeat);