SX1276GenericLib to support sx1276 bassed LoRa modules, including HopeRF RFM95, Murata CMWX1ZZABZ and Semtech SX1276MB1MAS/SX1276MB1LAS modules

Dependents:   DISCO-L072CZ-LRWAN1_LoRa_PingPong DISCO-L072CZ-LRWAN1_LoRa_PingPong DISCO-L072CZ-LRWAN1_LoRa_PingPong DISCO-L072CZ-LRWAN1_LoRa_USB_Rx ... more

Fork of SX1276Lib by Semtech

Revision:
56:4fddac05ac07
Parent:
55:00c1f5b83920
Child:
57:d9aba0f40823
--- 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