From 43733ce15055f04eca9196f72d60398f24bdf4b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 21 Jul 2022 10:07:08 +0200 Subject: [PATCH] Fix formula to consider Bandwidth in kHz --- src/mesh/RadioInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index 6005147e..8a6bda28 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -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);