ST-DEVKIT-LRWAN
Dependents: DISCO-L072CZ-LRWAN1-base
Fork of SX1276GenericLib by
Diff: sx1276/sx1276.cpp
- Revision:
- 56:4fddac05ac07
- Parent:
- 55:00c1f5b83920
- Child:
- 57:d9aba0f40823
diff -r 00c1f5b83920 -r 4fddac05ac07 sx1276/sx1276.cpp --- a/sx1276/sx1276.cpp Fri May 19 15:55:19 2017 +0200 +++ b/sx1276/sx1276.cpp Sun May 21 10:45:06 2017 +0200 @@ -349,7 +349,8 @@ break; case MODEM_LORA: { - bandwidth = GetLoRaBandwidthRegValue(bandwidth); + if (bandwidth > 11) // specified in Hz, needs mapping + bandwidth = GetLoRaBandwidthRegValue(bandwidth); if( bandwidth > LORA_BANKWIDTH_500kHz ) { // Fatal error: When using LoRa modem only bandwidths 125, 250 and 500 kHz are supported @@ -510,7 +511,8 @@ case MODEM_LORA: { this->settings.LoRa.Power = power; - bandwidth = GetLoRaBandwidthRegValue(bandwidth); + if (bandwidth > 11) // specified in Hz, needs mapping + bandwidth = GetLoRaBandwidthRegValue(bandwidth); if( bandwidth > LORA_BANKWIDTH_500kHz ) { // Fatal error: When using LoRa modem only bandwidths 125, 250 and 500 kHz are supported