Skip to content

Commit e862e38

Browse files
committed
Merge branch 'master' into develop
2 parents 912206e + b7e170c commit e862e38

File tree

3 files changed

+16
-22
lines changed

3 files changed

+16
-22
lines changed

src/mac/LoRaMacCommands.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,6 @@ LoRaMacCommandStatus_t LoRaMacCommandsRemoveNoneStickyCmds( void )
443443
}
444444
}
445445

446-
NvmCtxCallback( );
447-
448446
return LORAMAC_COMMANDS_SUCCESS;
449447
}
450448

@@ -467,8 +465,6 @@ LoRaMacCommandStatus_t LoRaMacCommandsRemoveStickyAnsCmds( void )
467465
curElement = nexElement;
468466
}
469467

470-
NvmCtxCallback( );
471-
472468
return LORAMAC_COMMANDS_SUCCESS;
473469
}
474470

src/mac/region/RegionAU915.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ extern "C"
8888
/*!
8989
* Maximal Rx1 receive datarate offset
9090
*/
91-
#define AU915_MAX_RX1_DR_OFFSET 6
91+
#define AU915_MAX_RX1_DR_OFFSET 5
9292

9393
/*!
9494
* Minimal Tx output power that can be used by the node

src/mac/region/RegionCommon.c

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ TimerTime_t RegionCommonUpdateBandTimeOff( bool joined, Band_t* bands,
337337
// when the duty cycle is off, or the TimeCredits of the band
338338
// is higher than the credit costs for the transmission.
339339
if( ( bands[i].TimeCredits > creditCosts ) ||
340-
( dutyCycleEnabled == false ) )
340+
( ( dutyCycleEnabled == false ) && ( joined == true ) ) )
341341
{
342342
bands[i].ReadyForTransmission = true;
343343
// This band is a potential candidate for an
@@ -350,24 +350,22 @@ TimerTime_t RegionCommonUpdateBandTimeOff( bool joined, Band_t* bands,
350350
// for the next transmission.
351351
bands[i].ReadyForTransmission = false;
352352

353-
// Differentiate the calculation if the device is joined or not.
354-
if( joined == true )
353+
if( bands[i].MaxTimeCredits > creditCosts )
355354
{
356-
if( bands[i].MaxTimeCredits > creditCosts )
357-
{
358-
// The band can only be taken into account, if the maximum credits
359-
// of the band are higher than the credit costs.
360-
// We calculate the minTimeToWait among the bands which are not
361-
// ready for transmission and which are potentially available
362-
// for a transmission in the future.
363-
minTimeToWait = MIN( minTimeToWait, ( creditCosts - bands[i].TimeCredits ) );
364-
// This band is a potential candidate for an
365-
// upcoming transmission (even if its time credits are not enough
366-
// at the moment), so increase the counter.
367-
validBands++;
368-
}
355+
// The band can only be taken into account, if the maximum credits
356+
// of the band are higher than the credit costs.
357+
// We calculate the minTimeToWait among the bands which are not
358+
// ready for transmission and which are potentially available
359+
// for a transmission in the future.
360+
minTimeToWait = MIN( minTimeToWait, ( creditCosts - bands[i].TimeCredits ) );
361+
// This band is a potential candidate for an
362+
// upcoming transmission (even if its time credits are not enough
363+
// at the moment), so increase the counter.
364+
validBands++;
369365
}
370-
else
366+
367+
// Apply a special calculation if the device is not joined.
368+
if( joined == false )
371369
{
372370
SysTime_t backoffTimeRange = {
373371
.Seconds = 0,

0 commit comments

Comments
 (0)