libmDot0mbed5

Fork of libmDot-mbed5 by MultiTech

Revision:
26:17479e0039f6
Parent:
19:f3a46d2bb9b3
diff -r 27e9d60ed709 -r 17479e0039f6 mDotEvent.h
--- a/mDotEvent.h	Mon Aug 29 14:48:33 2016 -0500
+++ b/mDotEvent.h	Tue Aug 30 11:48:00 2016 -0500
@@ -121,6 +121,7 @@
             PacketReceived = false;
             AckReceived = false;
             PongReceived = false;
+            TxNbRetries = 0;
 
             logDebug("mDotEvent - TxDone");
             memset(&_flags, 0, sizeof(LoRaMacEventFlags));
@@ -162,6 +163,12 @@
             Notify();
         }
 
+        virtual void MissedAck(uint8_t retries) {
+            logDebug("mDotEvent - MissedAck : retries %u", retries);
+            TxNbRetries = retries;
+            _info.TxNbRetries = retries;
+        }
+
         virtual void PacketRx(uint8_t port, uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr, lora::DownlinkControl ctrl, uint8_t slot, uint8_t retries = 0) {
             logDebug("mDotEvent - PacketRx");
             RxPort = port;
@@ -189,7 +196,7 @@
             _info.RxRssi = rssi;
             _info.RxSnr = snr;
             _info.TxAckReceived = AckReceived;
-            _info.TxAckReceived = retries;
+            _info.TxNbRetries = retries;
             _info.Status = LORAMAC_EVENT_INFO_STATUS_OK;
             Notify();
         }