-
Notifications
You must be signed in to change notification settings - Fork 212
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
v3.1.0 - sx1272 - line misspelled #537
Conversation
I found this misspelled on the code when I tried to use sx1272 lora module.
There was a problem hiding this 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
@@ -534,7 +534,7 @@ static void configLoraModem () { | |||
|
|||
// 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)); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 `)`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra (
and )
I found this misspelled on the code when I tried to use sx1272 lora module.
arduino-lmic/src/lmic/radio.c
Line 537 in f67121c