Skip to content

Commit 4f2b38d

Browse files
Daniel Jaecklemluis1
authored andcommitted
Issue #1255 - Fixed time credits check as proposed
1 parent ceb27e3 commit 4f2b38d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mac/region/RegionCommon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ TimerTime_t RegionCommonUpdateBandTimeOff( bool joined, Band_t* bands,
336336
// Check if the band is ready for transmission. Its ready,
337337
// when the duty cycle is off, or the TimeCredits of the band
338338
// is higher than the credit costs for the transmission.
339-
if( ( bands[i].TimeCredits > creditCosts ) ||
339+
if( ( bands[i].TimeCredits >= creditCosts ) ||
340340
( ( dutyCycleEnabled == false ) && ( joined == true ) ) )
341341
{
342342
bands[i].ReadyForTransmission = true;
@@ -350,7 +350,7 @@ TimerTime_t RegionCommonUpdateBandTimeOff( bool joined, Band_t* bands,
350350
// for the next transmission.
351351
bands[i].ReadyForTransmission = false;
352352

353-
if( bands[i].MaxTimeCredits > creditCosts )
353+
if( bands[i].MaxTimeCredits >= creditCosts )
354354
{
355355
// The band can only be taken into account, if the maximum credits
356356
// of the band are higher than the credit costs.

0 commit comments

Comments
 (0)