Skip to content

Commit 1acc148

Browse files
committed
Issue #752 - Applied proposed enhancement.
1 parent 895b6cd commit 1acc148

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/mac/LoRaMacCommands.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ Maintainer: Miguel Luis ( Semtech ), Daniel Jaeckle ( STACKFORCE ), Johannes Bru
3232
*/
3333
#define CID_FIELD_SIZE 1
3434

35-
/*!
36-
* List of all stick MAC command answers which will be deleted after a receiving downlink
37-
*/
38-
const uint8_t CIDsStickyAnsCmds[] = { MOTE_MAC_DL_CHANNEL_ANS, MOTE_MAC_RX_PARAM_SETUP_ANS, MOTE_MAC_RX_TIMING_SETUP_ANS };
39-
4035
/*!
4136
* Mac Commands list structure
4237
*/
@@ -460,16 +455,9 @@ LoRaMacCommandStatus_t LoRaMacCommandsRemoveStickyAnsCmds( void )
460455
while( curElement != NULL )
461456
{
462457
nexElement = curElement->Next;
463-
if( curElement->IsSticky == true )
458+
if( IsSticky( curElement->CID ) == true )
464459
{
465-
for( uint8_t i = 0; i < sizeof( CIDsStickyAnsCmds ); i++ )
466-
{
467-
if( curElement->CID == CIDsStickyAnsCmds[i] )
468-
{
469-
LoRaMacCommandsRemoveCmd( curElement );
470-
break;
471-
}
472-
}
460+
LoRaMacCommandsRemoveCmd( curElement );
473461
}
474462
curElement = nexElement;
475463
}

0 commit comments

Comments
 (0)