MultiTech / Mbed OS mDot_AT_firmware_CUSTOM

Dependencies:   libmDot-Custom MTS-Serial

Fork of mDot_AT_firmware_CUSTOM by Jason Reiss

To change channel plans replace AS923 with AU915, EU868, KR920 or US915 on line 15

#define CHANNEL_PLAN CP_AS923

See Supported Channel Plans

Revision:
24:739e3a700d34
Parent:
22:89a1202125bc
Child:
25:d53190a4ae96
--- a/main.cpp	Mon Dec 19 14:24:39 2016 +0000
+++ b/main.cpp	Fri Jan 06 17:50:40 2017 +0000
@@ -11,13 +11,28 @@
 
 #ifndef UNIT_TEST
 
+#ifndef CHANNEL_PLAN
+#define CHANNEL_PLAN CP_KR920
+#endif
+
 int main()
 {
     debug.baud(115200);
-
+    
+    // get a mDot handle
     mDot* dot = mDot::getInstance();
-    
+
+#if CHANNEL_PLAN == CP_AS923
     lora::ChannelPlan* plan = new lora::CustomChannelPlan_AS923(*dot->getRadio(), *dot->getSettings());
+#elif CHANNEL_PLAN == CP_US915
+    lora::ChannelPlan* plan = new lora::CustomChannelPlan_US915(*dot->getRadio(), *dot->getSettings());
+#elif CHANNEL_PLAN == CP_AU915
+    lora::ChannelPlan* plan = new lora::CustomChannelPlan_AU915(*dot->getRadio(), *dot->getSettings());
+#elif CHANNEL_PLAN == CP_EU868
+    lora::ChannelPlan* plan = new lora::CustomChannelPlan_EU868(*dot->getRadio(), *dot->getSettings());
+#elif CHANNEL_PLAN == CP_KR920
+    lora::ChannelPlan* plan = new lora::CustomChannelPlan_KR920(*dot->getRadio(), *dot->getSettings());
+#endif
 
     dot->setChannelPlan(plan);