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:
66:bcaa6dbf538a
Parent:
65:d546060aa03d
Child:
70:6b3ca63792c2
--- a/xDotBridge/src/CommProtocolPeerBrute.cpp	Wed Mar 15 09:49:58 2017 -0600
+++ b/xDotBridge/src/CommProtocolPeerBrute.cpp	Wed Mar 15 11:46:40 2017 -0600
@@ -13,8 +13,9 @@
 // wireless bridge protocol
 const uint8_t TX_PWR = 20; // 20 dBm
 const float RX_SLEEP_TIME = 2000; // ms (one second resolution, min 2 seconds)
-const uint8_t TX_TIME = 30; // in ms
-const unsigned int nTimesToTx = ceil(RX_SLEEP_TIME / ((float)TX_TIME));
+const uint8_t TX_TIME = 30*2; // in ms
+//const unsigned int nTimesToTx = ceil(RX_SLEEP_TIME / ((float)TX_TIME));
+const unsigned int nTimesToTx = 75; // Hand tuned to be over 2.03 seconds of transmitting
 //const uint8_t maxPayloadSize = 10; // Number of bytes (used for toa calcultion)
 
 CommProtocolPeerBrute::CommProtocolPeerBrute()
@@ -224,11 +225,11 @@
     if (!dot->getNetworkJoinStatus()) {
         join_network();
     }
-    myLogDebug("Starting TX.  Time: %lu", us_ticker_read());
+    myLogDebug("Starting TX.  Time: %07lu", us_ticker_read());
     for(uint8_t i=0;i<nTimesToTx;++i) {
         dot->send(msg);
     }
-    myLogDebug("Finished TX.  Time: %lu", us_ticker_read());
+    myLogDebug("Finished TX.  Time: %07lu", us_ticker_read());
     return cmdError;
 }
 
@@ -251,12 +252,7 @@
     // SeqNum 4 Bytes
     appendUint32ToVector(msg, mMemObj.getLastMsgSeq());
     mMemObj.incLastMsgSeq();
-    if (dot->send(msg) == mDot::MDOT_OK) {// Can just send once since the RX should be always listening
-        return cmdSuccess;
-    }
-    else {
-        return cmdError;
-    }
+    return send(msg);
 }
 
 CmdResult CommProtocolPeerBrute::sendPairReq()