ver1

Revision:
156:98ca7710192a
Parent:
155:ecb07dbd16e3
Child:
157:8e9b1e84ffac
diff -r ecb07dbd16e3 -r 98ca7710192a plans/ChannelPlan_IN865.cpp
--- a/plans/ChannelPlan_IN865.cpp	Wed May 30 09:24:04 2018 -0500
+++ b/plans/ChannelPlan_IN865.cpp	Mon Jun 04 13:33:39 2018 -0500
@@ -279,7 +279,7 @@
 
     RxWindow rxw = GetRxWindow(window);
 
-    if (_dlChannels[_txChannel].Frequency != 0  && window == 1)
+    if (_dlChannels[_txChannel].Frequency != 0)
         GetRadio()->SetChannel(_dlChannels[_txChannel].Frequency);
     else
         GetRadio()->SetChannel(rxw.Frequency);
@@ -878,24 +878,10 @@
 
 uint8_t lora::ChannelPlan_IN865::GetJoinDatarate() {
     uint8_t dr = GetSettings()->Session.TxDatarate;
-    static uint8_t cnt = 0;
-
-    if (GetSettings()->Test.DisableRandomJoinDatarate == lora::OFF) {
-        if ((cnt++ % 20) == 0) {
-            dr = lora::DR_0;
-        } else if ((cnt % 16) == 0) {
-            dr = lora::DR_1;
-        } else if ((cnt % 12) == 0) {
-            dr = lora::DR_2;
-        } else if ((cnt % 8) == 0) {
-            dr = lora::DR_3;
-        } else if ((cnt % 4) == 0) {
-            dr = lora::DR_4;
-        } else {
-            dr = lora::DR_5;
-        }
-    }
-
+    
+    // Default join datarate is DR2:SF10BW125
+    dr = lora::DR_2;
+    
     return dr;
 }