8000 lib/lora: Allow non-zero dr_min for top channels in AU/US915 regions by Bdanilko · Pull Request #164 · pycom/pycom-micropython-sigfox · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

lib/lora: Allow non-zero dr_min for top channels in AU/US915 regions #164

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/lora/mac/region/RegionAU915.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,11 +841,12 @@ LoRaMacStatus_t RegionAU915ChannelManualAdd( ChannelAddParams_t* channelAdd )
return LORAMAC_STATUS_PARAMETER_INVALID;
}

// Validate the datarate range for min: must be DR_0
if( channelAdd->NewChannel->DrRange.Fields.Min != DR_0 )
// Validate the datarate range for min: must be DR_0 for channels 0-63
if( id < 64 && channelAdd->NewChannel->DrRange.Fields.Min != DR_0 )
{
drInvalid = true;
}

// Validate the datarate range for max: must be <= TX_MAX_DATARATE
if( channelAdd->NewChannel->DrRange.Fields.Max > AU915_TX_MAX_DATARATE )
{
Expand Down
5 changes: 3 additions & 2 deletions lib/lora/mac/region/RegionUS915.c
< 600B td class="blob-code blob-code-context js-file-line"> }
Original file line number Diff line number Diff line change
Expand Up @@ -849,11 +849,12 @@ LoRaMacStatus_t RegionUS915ChannelManualAdd( ChannelAddParams_t* channelAdd )
return LORAMAC_STATUS_PARAMETER_INVALID;

// Validate the datarate range for min: must be DR_0
if( channelAdd->NewChannel->DrRange.Fields.Min != DR_0 )
// Validate the datarate range for min: must be DR_0 for channels 0-63
if( id < 64 && channelAdd->NewChannel->DrRange.Fields.Min != DR_0 )
{
drInvalid = true;
}

// Validate the datarate range for max: must be <= TX_MAX_DATARATE
if( channelAdd->NewChannel->DrRange.Fields.Max > US915_TX_MAX_DATARATE )
{
Expand Down
0