Fork to see if I can get working

Dependencies:   BufferedSerial OneWire WinbondSPIFlash libxDot-dev-mbed5-deprecated

Fork of xDotBridge_update_test20180823 by Matt Briggs

Revision:
95:aa9908d459c2
Parent:
92:1f86edb14cbe
Child:
99:83b54c851187
--- a/xDotBridge/src/main.cpp	Wed Nov 22 01:11:36 2017 +0000
+++ b/xDotBridge/src/main.cpp	Tue Nov 28 16:15:23 2017 +0000
@@ -18,7 +18,7 @@
 
 #define RX_SEQ_LOG 1
 
-const float BridgeVersion = 1.98; // Bumped 2017/11/TODO
+const float BridgeVersion = 1.96; // Bumped 2017/11/TODO
 
 // 232 Pins
 const PinName SER_TERM_TX = UART_TX;
@@ -30,6 +30,7 @@
 InterruptIn uart1RxIntIn (SER_TERM_RX);
 
 mDot* dot = NULL; // Used by dot-utils
+lora::ChannelPlan* plan = NULL;
 
 volatile bool uartRxFlag;
 volatile bool ccIntFlag;
@@ -71,7 +72,7 @@
     MyLog::setLogLevel(MyLog::DEBUG_LEVEL);
 
 	// use US915 plan
-    lora::ChannelPlan* plan = new lora::ChannelPlan_US915();
+    plan = new lora::ChannelPlan_US915();
     // use EU868 plan
     // lora::ChannelPlan* plan = new lora::ChannelPlan_EU868();
     assert(plan);
@@ -101,7 +102,6 @@
 
     dot->setWakeMode(mDot::RTC_ALARM_OR_INTERRUPT);
     dot->setWakePin(GPIO0);
-//    dot->setWakePin(UART_RX);
 
     display_config();  // Print configuration for now
 
@@ -194,6 +194,8 @@
                     rxSeqLog.clear();
                     rxSeqLog.save();
                     myLogInfo("NVM Cleared Seq Log");
+                    myLogInfo("Resetting...");
+                    dot->resetCpu();
                 }
             }
             if (protocol->isRx()) {
@@ -221,6 +223,8 @@
                     rxSeqLog.clear();
                     rxSeqLog.save();
                     myLogInfo("NVM Cleared Seq Log");
+                    myLogInfo("Resetting...");
+                    dot->resetCpu();
                 }
                 else if (pairBtnState == pairBtnLongPress) {
                     myLogInfo("Clearing pair values and generating new ones.");