Skip to content

Commit

Permalink
Merge pull request #7 from Mobiak/patch1
Browse files Browse the repository at this point in the history
Weird conditions to check datarate on cmd mac SRV_MAC_NEW_CHANNEL_REQ
  • Loading branch information
mluis1 committed Jun 29, 2015
2 parents 5edd066 + 6c30fd4 commit 7611f72
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/mac/LoRaMac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1191,11 +1191,11 @@ static void LoRaMacProcessMacCommands( uint8_t *payload, uint8_t macIndex, uint8
status &= 0xFE; // Channel frequency KO
}

if( ( chParam.DrRange.Fields.Min > chParam.DrRange.Fields.Max ) &&
( ( LORAMAC_MIN_DATARATE <= chParam.DrRange.Fields.Min ) &&
( chParam.DrRange.Fields.Min <= LORAMAC_MAX_DATARATE ) == false ) &&
( ( LORAMAC_MIN_DATARATE <= chParam.DrRange.Fields.Max ) &&
( chParam.DrRange.Fields.Max <= LORAMAC_MAX_DATARATE ) == false ) )
if( ( chParam.DrRange.Fields.Min > chParam.DrRange.Fields.Max ) ||
( ( ( LORAMAC_MIN_DATARATE <= chParam.DrRange.Fields.Min ) &&
( chParam.DrRange.Fields.Min <= LORAMAC_MAX_DATARATE ) ) == false ) ||
( ( ( LORAMAC_MIN_DATARATE <= chParam.DrRange.Fields.Max ) &&
( chParam.DrRange.Fields.Max <= LORAMAC_MAX_DATARATE ) ) == false ) )
{
status &= 0xFD; // Datarate range KO
}
Expand Down

0 comments on commit 7611f72

Please sign in to comment.