Skip to content

Commit

Permalink
[LoRaWAN] Fix LR-FHSS bw encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenCellist committed Oct 28, 2024
1 parent 6a5dcc6 commit 05d5ef2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/protocols/LoRaWAN/LoRaWAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3331,15 +3331,15 @@ int16_t LoRaWANNode::findDataRate(uint8_t dr, DataRate_t* dataRate) {
modemNew = ModemType_t::LRFHSS;
switch(dataRateBand & RADIOLIB_LORAWAN_DATA_RATE_BW) {
case(RADIOLIB_LORAWAN_DATA_RATE_BW_137_KHZ):
dataRate->lrFhss.bw = 137.0;
dataRate->lrFhss.bw = 0x02; // specific encoding
dataRate->lrFhss.narrowGrid = 1;
break;
case(RADIOLIB_LORAWAN_DATA_RATE_BW_336_KHZ):
dataRate->lrFhss.bw = 336.0;
dataRate->lrFhss.bw = 0x04; // specific encoding
dataRate->lrFhss.narrowGrid = 1;
break;
case(RADIOLIB_LORAWAN_DATA_RATE_BW_1523_KHZ):
dataRate->lrFhss.bw = 1523.0;
dataRate->lrFhss.bw = 0x08; // specific encoding
dataRate->lrFhss.narrowGrid = 0;
break;
default:
Expand Down

0 comments on commit 05d5ef2

Please sign in to comment.