Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update LoRaMac.c #4

Merged
merged 2 commits into from
May 26, 2015
Merged

Update LoRaMac.c #4

merged 2 commits into from
May 26, 2015

Conversation

sbress
Copy link
Contributor

@sbress sbress commented May 26, 2015

Fixes wrong index in a for loop

Fixes wrong index in a for loop
@mluis1
Copy link
Contributor

mluis1 commented May 26, 2015

Thanks for the finding. But, I think that the correction would be better as follows:

                //CFList
                if( ( size - 1 ) > 16 )
                {
                    ChannelParams_t param;
                    param.DrRange.Value = ( DR_SF7 << 4 ) | DR_SF12;

                    for( uint8_t i = 3, j = 0; i < ( 5 + 3 ); i++, j += 3 )
                    {
                        param.Frequency = ( LoRaMacPayload[13 + j] | ( LoRaMacPayload[14 + j] << 8 ) | ( LoRaMacPayload[15 + j] << 16 ) ) * 100;
                        LoRaMacSetChannel( i, param );
                    }
                }

Could you please re-submit the patch.

mluis1 added a commit that referenced this pull request May 26, 2015
Corrected the CFList management on JoinAccept. The for loop indexes where wrong.
@mluis1 mluis1 merged commit dba371f into Lora-net:master May 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants