Skip to content

Conversation

@ricaun
Copy link

@ricaun ricaun commented Feb 11, 2020

I found this misspelled on the code when I tried to use sx1272 lora module.

mc2 = (SX1272_MC2_SF7 + ((sf-1)<<4)) | 0x04 | ((LMIC.rxsyms >> 8) & 0x3));

I found this misspelled on the code when I tried to use sx1272 lora module.
Copy link
Member

@terrillmoore terrillmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments. Thanks very much for submitting this PR!

src/lmic/radio.c Outdated
// set ModemConfig2 (sf, AgcAutoOn=1 SymbTimeoutHi)
u1_t mc2;
mc2 = (SX1272_MC2_SF7 + ((sf-1)<<4)) | 0x04 | ((LMIC.rxsyms >> 8) & 0x3));
mc2 = ((SX1272_MC2_SF7 + ((sf-1)<<4)) | 0x04 | ((LMIC.rxsyms >> 8) & 0x3));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh. I wonder how this got through CI testing, as I thought I was compiling for SX1272.

This will work, but I think it's more matching the rest of the style to remove the extra ) at the end of the line, i.e.:

mc2 = (SX1272_MC2_SF7 + ((sf-1)<<4)) | 0x04 | ((LMIC.rxsyms >> 8) & 0x3);

The intent is to compute a | b | c; the extra parens make it harder to read.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why I put an extra ( instead of deleting the ) 😄

Remove extra `(` and `)`
Copy link
Author

@ricaun ricaun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra ( and )

@terrillmoore terrillmoore merged commit 9a81d82 into mcci-catena:master Feb 14, 2020
terrillmoore added a commit that referenced this pull request Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants