Rename REGULATORY_GAIN to REGULATORY_GAIN_LORA to allow for other RF gain controls

For example, Wi-Fi or BLE gain control (#3962)

Signed-off-by: Andrew Yong <me@ndoo.sg>
This commit is contained in:
Andrew Yong
2024-05-23 23:28:07 +08:00
parent 537814df58
commit 08e1c2f681
3 changed files with 6 additions and 6 deletions

View File

@@ -478,8 +478,8 @@ void RadioInterface::applyModemConfig()
power = loraConfig.tx_power;
if ((power == 0) || ((power + REGULATORY_GAIN > myRegion->powerLimit) && !devicestate.owner.is_licensed))
power = myRegion->powerLimit - REGULATORY_GAIN;
if ((power == 0) || ((power + REGULATORY_GAIN_LORA > myRegion->powerLimit) && !devicestate.owner.is_licensed))
power = myRegion->powerLimit - REGULATORY_GAIN_LORA;
if (power == 0)
power = 17; // Default to this power level if we don't have a valid regional power limit (powerLimit of myRegion defaults