[LoRaMac ProcessRadioTxDone]Optimize code reading and execution conditions
This commit is contained in:
parent
eec7ff9694
commit
f4ff52aa50
|
@ -1041,6 +1041,9 @@ static void ProcessRadioTxDone( void )
|
||||||
phyParam = RegionGetPhyParam( Nvm.MacGroup2.Region, &getPhy );
|
phyParam = RegionGetPhyParam( Nvm.MacGroup2.Region, &getPhy );
|
||||||
TimerSetValue( &MacCtx.AckTimeoutTimer, MacCtx.RxWindow2Delay + phyParam.Value );
|
TimerSetValue( &MacCtx.AckTimeoutTimer, MacCtx.RxWindow2Delay + phyParam.Value );
|
||||||
TimerStart( &MacCtx.AckTimeoutTimer );
|
TimerStart( &MacCtx.AckTimeoutTimer );
|
||||||
|
} else if( MacCtx.NodeAckRequested == false )
|
||||||
|
{
|
||||||
|
MacCtx.McpsConfirm.Status = LORAMAC_EVENT_INFO_STATUS_OK;
|
||||||
}
|
}
|
||||||
#elif (defined( LORAMAC_VERSION ) && (( LORAMAC_VERSION == 0x01000400 ) || ( LORAMAC_VERSION == 0x01010100 )))
|
#elif (defined( LORAMAC_VERSION ) && (( LORAMAC_VERSION == 0x01000400 ) || ( LORAMAC_VERSION == 0x01010100 )))
|
||||||
if( MacCtx.NodeAckRequested == true )
|
if( MacCtx.NodeAckRequested == true )
|
||||||
|
@ -1072,13 +1075,6 @@ static void ProcessRadioTxDone( void )
|
||||||
}
|
}
|
||||||
|
|
||||||
RegionSetBandTxDone( Nvm.MacGroup2.Region, &txDone );
|
RegionSetBandTxDone( Nvm.MacGroup2.Region, &txDone );
|
||||||
|
|
||||||
#if (defined( LORAMAC_VERSION ) && ( LORAMAC_VERSION == 0x01000300 ))
|
|
||||||
if( MacCtx.NodeAckRequested == false )
|
|
||||||
{
|
|
||||||
MacCtx.McpsConfirm.Status = LORAMAC_EVENT_INFO_STATUS_OK;
|
|
||||||
}
|
|
||||||
#endif /* LORAMAC_VERSION */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrepareRxDoneAbort( void )
|
static void PrepareRxDoneAbort( void )
|
||||||
|
|
Loading…
Reference in New Issue