From bd2b766a369f5782da87f8c63fc134fa1cf9ca01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 12 Jan 2023 14:03:06 +0100 Subject: [PATCH] Rename to make function clearer --- src/airtime.cpp | 4 ++-- src/airtime.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/airtime.cpp b/src/airtime.cpp index 94ef6d5b2..0c3fe81fc 100644 --- a/src/airtime.cpp +++ b/src/airtime.cpp @@ -132,10 +132,10 @@ bool AirTime::isTxAllowedChannelUtil(bool polite) bool AirTime::isTxAllowedAirUtil() { if (!config.lora.override_duty_cycle && myRegion->dutyCycle < 100) { - if (utilizationTXPercent() < myRegion->dutyCycle * polite_tx_util_percent / 100) { + if (utilizationTXPercent() < myRegion->dutyCycle * polite_duty_cycle_percent / 100) { return true; } else { - LOG_WARN("Tx air utilization is >%d percent. Skipping this opportunity to send.\n", polite_tx_util_percent); + LOG_WARN("Tx air utilization is >%d percent. Skipping this opportunity to send.\n", myRegion->dutyCycle * polite_duty_cycle_percent / 100); return false; } } diff --git a/src/airtime.h b/src/airtime.h index 5ba6f676a..e454b35ad 100644 --- a/src/airtime.h +++ b/src/airtime.h @@ -70,7 +70,7 @@ class AirTime : private concurrency::OSThread uint32_t secSinceBoot = 0; uint8_t max_channel_util_percent = 40; uint8_t polite_channel_util_percent = 25; - uint8_t polite_tx_util_percent = 50; // half of Duty Cycle allowance + uint8_t polite_duty_cycle_percent = 50; // half of Duty Cycle allowance is ok for metadata struct airtimeStruct { uint32_t periodTX[PERIODS_TO_LOG]; // AirTime transmitted