-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
In the development branch, ScheduleTx calls CalculateBackOff each time a transmission is scheduled:
static LoRaMacStatus_t ScheduleTx( void )
{
...
// Update Backoff
CalculateBackOff( LastTxChannel );
...
// Schedule transmission of frame
if( dutyCycleTimeOff == 0 )
{
// Try to send now
return SendFrameOnChannel( Channel );
}
else
{
// Send later - prepare timer
LoRaMacState |= LORAMAC_TX_DELAYED;
TimerSetValue( &TxDelayedTimer, dutyCycleTimeOff );
TimerStart( &TxDelayedTimer );
return LORAMAC_STATUS_OK;
}
}
It looks like if there is no available channel and the transmission is delayed, ScheduleTx will be called a second time. CalculateBackoff would then be called a second time, resulting in AggregatedTimeOff being incremented twice instead of once?