![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Fork to see if I can get working
Dependencies: BufferedSerial OneWire WinbondSPIFlash libxDot-dev-mbed5-deprecated
Fork of xDotBridge_update_test20180823 by
Diff: xDotBridge/src/CommProtocolPeerBrute.cpp
- Revision:
- 72:bcc66cdfd101
- Parent:
- 70:6b3ca63792c2
- Child:
- 75:600cb3a9f126
--- a/xDotBridge/src/CommProtocolPeerBrute.cpp Mon Mar 27 13:04:39 2017 -0600 +++ b/xDotBridge/src/CommProtocolPeerBrute.cpp Mon Apr 10 16:02:14 2017 -0600 @@ -338,11 +338,23 @@ { float t = 0.0; bool msgPending; + bool validPairReq = false; + std::vector<uint8_t> pairMsg; do { listen(msgPending); t += TX_TIME/1000.0; + if (msgPending) { + pairMsg.clear(); + dot->recv(pairMsg); + if (pairMsg[0] == 0xFE && pairMsg[1] == 0x01) { + validPairReq = true; + } + else { + myLogWarning("Invalid pair message message flag received ."); + } + } } - while (t < waitTime && !msgPending); + while (t < waitTime && !validPairReq); if (!msgPending) { return cmdTimeout;