Fork to see if I can get working

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

Fork of xDotBridge_update_test20180823 by Matt Briggs

Files at this revision

API Documentation at this revision

Comitter:
Matt Briggs
Date:
Mon Mar 27 13:04:39 2017 -0600
Parent:
70:6b3ca63792c2
Child:
72:bcc66cdfd101
Commit message:
Version modified for testing on 2017/03/27

Changed in this revision

xDotBridge/src/main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/xDotBridge/src/main.cpp	Mon Mar 27 09:16:33 2017 -0600
+++ b/xDotBridge/src/main.cpp	Mon Mar 27 13:04:39 2017 -0600
@@ -15,7 +15,7 @@
 
 #define RX_SEQ_LOG 1
 
-const float BridgeVersion = 0.2;
+const float BridgeVersion = 0.3;
 
 #ifndef __TEST__ // Exclude code for tests
 Serial pc(USBTX, USBRX);
@@ -189,6 +189,11 @@
                     protocol->configForSavedNetwork();
                     protocol->printDotConfig();
                     protocol->resetCounters();
+
+                    // Clear test log
+                    rxSeqLog.clear();
+                    rxSeqLog.save();
+                    myLogInfo("NVM Cleared Seq Log");
                 }
             }
             if (protocol->isRx()) {
@@ -211,6 +216,11 @@
                     protocol->configForSavedNetwork();
                     protocol->printDotConfig();
                     protocol->resetCounters();
+
+                    // Clear test log
+                    rxSeqLog.clear();
+                    rxSeqLog.save();
+                    myLogInfo("NVM Cleared Seq Log");
                 }
                 else if (pairBtnState == pairBtnLongPress) {
                     myLogInfo("Clearing pair values and generating new ones.");
@@ -250,7 +260,8 @@
             bbio->prepareSleep();
 		    if (bbio->isCCInAlert()) { // Still in alert mode
 		        // Sleep for 5 seconds to ensure that receiver does not miss a message sequence
-                dot->sleep(5, mDot::RTC_ALARM_OR_INTERRUPT, false);  // Go to sleep and check in 5 secs if CCInAlert is asserted
+//                dot->sleep(5, mDot::RTC_ALARM_OR_INTERRUPT, false);  // Go to sleep and check in 5 secs if CCInAlert is asserted
+                dot->sleep(13, mDot::RTC_ALARM_OR_INTERRUPT, false);  // Just for test FIXME
 		    }
 		    else {
                 dot->sleep(0, mDot::INTERRUPT, false);  // Go to sleep until wake button