Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 |
--- 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");