![](/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:
- 54:c04d7b6fa075
- Parent:
- 53:a1563574a980
- Child:
- 55:79ab0bbc5008
--- a/xDotBridge/src/CommProtocolPeerBrute.cpp Wed Feb 22 10:45:56 2017 -0700 +++ b/xDotBridge/src/CommProtocolPeerBrute.cpp Wed Feb 22 15:39:40 2017 -0700 @@ -21,6 +21,7 @@ logInfo("RX_SLEEP_TIME %f, timeOnAir %lu, nTimesToTx %lu", RX_SLEEP_TIME, TX_TIME, nTimesToTx); mIsTx = true; // default to TX + mPrevDownLinkCnt = dot->getDownLinkCounter(); // dot = mDot::getInstance(); } @@ -127,19 +128,25 @@ join_network(); } - uint32_t cDwnLink = dot->getDownLinkCounter(); +// uint32_t cDwnLink = dot->getDownLinkCounter(); wait(TX_TIME/1000.0); // Wait TX_TIME - if (cDwnLink < dot->getDownLinkCounter()) { + if (mPrevDownLinkCnt < dot->getDownLinkCounter()) { msgPending = true; } else { msgPending = false; } + mPrevDownLinkCnt = dot->getDownLinkCounter(); return cmdSuccess; // Maybe add timeout as a possible return value } +CmdResult CommProtocolPeerBrute::sampleDLC () { + mPrevDownLinkCnt = dot->getDownLinkCounter(); + return cmdSuccess; +} + CmdResult CommProtocolPeerBrute::recv (std::vector<uint8_t> &msg) { dot->recv(msg);