Fix formula to consider Bandwidth in kHz

raytac-diy
Thomas Göttgens 2022-07-21 10:07:08 +02:00
rodzic 0010231172
commit 43733ce150
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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);