Merge pull request #1511 from meshtastic/radiolib-fix

Set TX Power to some meaningful value
pull/1515/head
Thomas Göttgens 2022-06-13 23:24:37 +02:00 zatwierdzone przez GitHub
commit e85baf00c4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -402,6 +402,12 @@ void RadioInterface::applyModemConfig()
power = loraConfig.tx_power;
assert(myRegion); // Should have been found in init
if ((power == 0) || (power > myRegion->powerLimit))
power = myRegion->powerLimit;
if (power == 0)
power = 17; // Default to default power if we don't have a valid power
// Calculate the number of channels
uint32_t numChannels = floor((myRegion->freqEnd - myRegion->freqStart) / (myRegion->spacing + (bw / 1000)));