The Modified Dot Library for SX1272
This version has been restoring as initial changes.
Verify the following dependencies:
Mbed-os 5.11 libmdot 3.2.0 for Mbed OS5.11
Revision 82:bfca91bb8341, committed 2020-07-10
- Comitter:
- DanistyWuKids
- Date:
- Fri Jul 10 23:47:58 2020 +1000
- Branch:
- old_stable_update
- Parent:
- 67:a9d4d7cdeca1
- Commit message:
- Update same as on 75:268c51ddfc06
Changed in this revision
mDotEvent.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r a9d4d7cdeca1 -r bfca91bb8341 mDotEvent.h --- a/mDotEvent.h Wed May 01 09:18:46 2019 -0500 +++ b/mDotEvent.h Fri Jul 10 23:47:58 2020 +1000 @@ -249,6 +249,42 @@ _info.Status = LORAMAC_EVENT_INFO_STATUS_OK; Notify(); } + + virtual void PacketRx2(uint8_t port, uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr, lora::DownlinkControl ctrl, uint8_t slot, uint8_t retries, uint32_t address, bool dupRx) { + logDebug("mDotEvent - PacketRx ADDR: %08x", address); + RxPort = port; + PacketReceived = true; + + memcpy(RxPayload, payload, size); + RxPayloadSize = size; + + if (ctrl.Bits.Ack) { + AckReceived = true; + } + + DuplicateRx = dupRx; + + if (mts::MTSLog::getLogLevel() == mts::MTSLog::TRACE_LEVEL) { + std::string packet = mts::Text::bin2hexString(RxPayload, size); + int number = (int)strtol(packet.c_str(), NULL, 16); + logTrace("Payload: %d", number); + } + + _flags.Bits.Tx = 0; + _flags.Bits.Rx = 1; + _flags.Bits.RxData = size > 0; + _flags.Bits.RxSlot = slot; + _info.RxBuffer = payload; + _info.RxBufferSize = size; + _info.RxPort = port; + _info.RxRssi = rssi; + _info.RxSnr = snr; + _info.TxAckReceived = AckReceived; + _info.DuplicateRx = DuplicateRx; + _info.TxNbRetries = retries; + _info.Status = LORAMAC_EVENT_INFO_STATUS_OK; + Notify(); + } virtual void RxDone(uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr, lora::DownlinkControl ctrl, uint8_t slot) { logDebug("mDotEvent - RxDone");