From 1acc1487ecd0933697f1cce321549b657831c7b1 Mon Sep 17 00:00:00 2001 From: Miguel Luis Date: Tue, 2 Jul 2019 14:39:18 +0200 Subject: [PATCH] Issue #752 - Applied proposed enhancement. --- src/mac/LoRaMacCommands.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/mac/LoRaMacCommands.c b/src/mac/LoRaMacCommands.c index 2cbdf2424..70d887043 100644 --- a/src/mac/LoRaMacCommands.c +++ b/src/mac/LoRaMacCommands.c @@ -32,11 +32,6 @@ Maintainer: Miguel Luis ( Semtech ), Daniel Jaeckle ( STACKFORCE ), Johannes Bru */ #define CID_FIELD_SIZE 1 -/*! - * List of all stick MAC command answers which will be deleted after a receiving downlink - */ -const uint8_t CIDsStickyAnsCmds[] = { MOTE_MAC_DL_CHANNEL_ANS, MOTE_MAC_RX_PARAM_SETUP_ANS, MOTE_MAC_RX_TIMING_SETUP_ANS }; - /*! * Mac Commands list structure */ @@ -460,16 +455,9 @@ LoRaMacCommandStatus_t LoRaMacCommandsRemoveStickyAnsCmds( void ) while( curElement != NULL ) { nexElement = curElement->Next; - if( curElement->IsSticky == true ) + if( IsSticky( curElement->CID ) == true ) { - for( uint8_t i = 0; i < sizeof( CIDsStickyAnsCmds ); i++ ) - { - if( curElement->CID == CIDsStickyAnsCmds[i] ) - { - LoRaMacCommandsRemoveCmd( curElement ); - break; - } - } + LoRaMacCommandsRemoveCmd( curElement ); } curElement = nexElement; }