Fork of Semtech LoRaWAN stack
Fork of LoRaWAN-lib by
Diff: LoRaMac.cpp
- Branch:
- v4.2.0
- Revision:
- 23:80965acdd311
- Parent:
- 22:43aa9a123248
- Child:
- 24:69286d8b3962
--- a/LoRaMac.cpp Fri Oct 07 13:22:13 2016 +0000
+++ b/LoRaMac.cpp Wed Oct 12 19:26:37 2016 +0000
@@ -1261,27 +1261,6 @@
DownLinkCounter = downLinkCounter;
}
- // Check if the frame is an acknowledgement
- if( fCtrl.Bits.Ack == 1 )
- {
- McpsConfirm.AckReceived = true;
- McpsIndication.AckReceived = true;
-
- // Stop the AckTimeout timer as no more retransmissions
- // are needed.
- TimerStop( &AckTimeoutTimer );
- }
- else
- {
- McpsConfirm.AckReceived = false;
-
- if( AckTimeoutRetriesCounter > AckTimeoutRetries )
- {
- // Stop the AckTimeout timer as no more retransmissions
- // are needed.
- TimerStop( &AckTimeoutTimer );
- }
- }
if( ( ( size - 4 ) - appPayloadStartIndex ) > 0 )
{
@@ -1345,6 +1324,27 @@
if( skipIndication == false )
{
+ // Check if the frame is an acknowledgement
+ if( fCtrl.Bits.Ack == 1 )
+ {
+ McpsConfirm.AckReceived = true;
+ McpsIndication.AckReceived = true;
+
+ // Stop the AckTimeout timer as no more retransmissions
+ // are needed.
+ TimerStop( &AckTimeoutTimer );
+ }
+ else
+ {
+ McpsConfirm.AckReceived = false;
+
+ if( AckTimeoutRetriesCounter > AckTimeoutRetries )
+ {
+ // Stop the AckTimeout timer as no more retransmissions
+ // are needed.
+ TimerStop( &AckTimeoutTimer );
+ }
+ }
LoRaMacFlags.Bits.McpsInd = 1;
}
}


