Skip to content

Commit

Permalink
Reset ADR ACK Counter only for RX1 or RX2 reception
Browse files Browse the repository at this point in the history
  • Loading branch information
mluis1 committed Jun 17, 2019
1 parent 4051c9f commit 6b6ca90
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mac/LoRaMac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,12 @@ static void ProcessRadioRxDone( void )
MacCtx.McpsConfirm.Status = LORAMAC_EVENT_INFO_STATUS_OK;
MacCtx.McpsConfirm.AckReceived = macMsgData.FHDR.FCtrl.Bits.Ack;

MacCtx.NvmCtx->AdrAckCounter = 0;
// Reset ADR ACK Counter only, when RX1 or RX2 slot
if( ( MacCtx.McpsIndication.RxSlot == RX_SLOT_WIN_1 ) ||
( MacCtx.McpsIndication.RxSlot == RX_SLOT_WIN_2 ) )
{
MacCtx.NvmCtx->AdrAckCounter = 0;
}

// MCPS Indication and ack requested handling
if( multicast == 1 )
Expand Down

0 comments on commit 6b6ca90

Please sign in to comment.