Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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