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:
53:a1563574a980
Parent:
44:ece6330e9b57
Child:
54:c04d7b6fa075
--- a/xDotBridge/src/CommProtocolPeerBrute.cpp	Tue Feb 21 15:33:57 2017 -0700
+++ b/xDotBridge/src/CommProtocolPeerBrute.cpp	Wed Feb 22 10:45:56 2017 -0700
@@ -21,7 +21,7 @@
     logInfo("RX_SLEEP_TIME %f, timeOnAir %lu, nTimesToTx %lu", RX_SLEEP_TIME, TX_TIME, nTimesToTx);
 
     mIsTx = true; // default to TX
-    dot = mDot::getInstance();
+//    dot = mDot::getInstance();
 }
 
 CmdResult CommProtocolPeerBrute::init()
@@ -77,7 +77,10 @@
     // as long as both Dots are configured correctly, they should be able to communicate
 
     // FIXME just using pairing keys for now
+    wait(0.1);
     update_peer_to_peer_config(pair_network_address, pair_network_session_key, pair_data_session_key, tx_frequency, tx_datarate, tx_power);
+    wait(0.1);
+    dot->saveConfig();
     return cmdSuccess;
 }
 void CommProtocolPeerBrute::setTx(bool isTx)
@@ -101,7 +104,7 @@
         join_network();
     }
     logInfo("Starting TX.  Time: %lu", us_ticker_read());
-    for(uint i=0;i<nTimesToTx;++i) {
+    for(uint8_t i=0;i<nTimesToTx;++i) {
         dot->send(msg);
     }
     logInfo("Finished TX.  Time: %lu", us_ticker_read());