Merge pull request #1563 from meshtastic/patch1

Fix formula to consider Bandwidth in kHz
This commit is contained in:
Thomas Göttgens 2022-07-21 10:20:41 +02:00 committed by GitHub
commit b36cd32c03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -426,7 +426,7 @@ void RadioInterface::applyModemConfig()
// float freq = myRegion->freqStart + ((((myRegion->freqEnd - myRegion->freqStart) / numChannels) / 2) * channel_num);
// New frequency selection formula
float freq = myRegion->freqStart + (bw / 2) + ( channel_num * bw);
float freq = myRegion->freqStart + (bw / 2000) + ( channel_num * (bw / 1000));
saveChannelNum(channel_num);
saveFreq(freq + config.lora.frequency_offset);