8000 lib/lora: Fix manual channel add for US915 and AU915 regions. · pycom/pycom-micropython-sigfox@ae3a294 · 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.

Commit ae3a294

Browse files
author
Daniel Campora
committed
lib/lora: Fix manual channel add for US915 and AU915 regions.
1 parent bcb6c50 commit ae3a294

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/lora/mac/region/RegionAU915.c

< 8000 button data-component="IconButton" type="button" class="prc-Button-ButtonBase-c50BI ml-1 flex-shrink-0 prc-Button-IconButton-szpyj" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="invisible" aria-describedby=":R79mtlab:-loading-announcement" aria-labelledby=":R9mtlab:">
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,12 +842,12 @@ LoRaMacStatus_t RegionAU915ChannelManualAdd( ChannelAddParams_t* channelAdd )
842842
}
843843

844844
// Validate the datarate range for min: must be DR_0
845-
if( channelAdd->NewChannel->DrRange.Fields.Min > DR_0 )
845+
if( channelAdd->NewChannel->DrRange.Fields.Min != DR_0 )
846846
{
847847
drInvalid = true;
848848
}
849849
// Validate the datarate range for max: must be <= TX_MAX_DATARATE
850-
if( channelAdd->NewChannel->DrRange.Fields.Max != AU915_TX_MAX_DATARATE )
850+
if( channelAdd->NewChannel->DrRange.Fields.Max > AU915_TX_MAX_DATARATE )
851851
{
852852
drInvalid = true;
853853
}

lib/lora/mac/region/RegionUS915.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,12 +850,12 @@ LoRaMacStatus_t RegionUS915ChannelManualAdd( ChannelAddParams_t* channelAdd )
850850
}
851851

852852
// Validate the datarate range for min: must be DR_0
853-
if( channelAdd->NewChannel->DrRange.Fields.Min > DR_0 )
853+
if( channelAdd->NewChannel->DrRange.Fields.Min != DR_0 )
854854
{
855855
drInvalid = true;
856856
}
857857
// Validate the datarate range for max: must be <= TX_MAX_DATARATE
858-
if( channelAdd->NewChannel->DrRange.Fields.Max != US915_TX_MAX_DATARATE )
858+
if( channelAdd->NewChannel->DrRange.Fields.Max > US915_TX_MAX_DATARATE )
859859
{
860860
drInvalid = true;
861861
}

0 commit comments

Comments
 (0)
0