-
Notifications
You must be signed in to change notification settings - Fork 3k
LoRaWAN: Style and bug fixes #6938
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
Conversation
9b056df
to
93fa698
Compare
93fa698
to
1baf2a4
Compare
@hasnainvirk 👍 , I can still see issues in AStyle, not certain if those files are ours or not (if 3rd party, we shall add them to astyle ignore). Please review |
@0xc0170 Yes there are still warnings. I did not change them as that bloats the code. It becomes unreadable if I follow the style guide. |
Couple of astyle oddities there:
I wouldn't generally take any tool too seriously on multiline alignment, but it's right on lots of the other stuff, like spaces around brackets and asterisks. |
Thanks @kjbracey-arm , will look at those oddities and report back. Not a blocker for this PR, but
At least this could be fixed once for all. |
4925543
to
6764e00
Compare
(params->connection_u.abp.nwk_id == 0) || | ||
(params->connection_u.abp.nwk_skey == NULL) || | ||
(params->connection_u.abp.app_skey == NULL)) { | ||
return LORAWAN_STATUS_PARAMETER_INVALID; |
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.
Change these to the same style as aboce done for OTAA checks. (|| operator at the beginning of the line.)
6764e00
to
ea19998
Compare
@kjbracey-arm Please review again. |
@0xc0170 Same CI failure here as well. Please kick start the job again. |
We'll start CI as soon as we can. Working through an issue behind the scenes. |
@hasnainvirk Can you rebase? By the way , I am reviewing those astyle issues . I believe I already had it fixed but then reworked entire branch and this got lost. Will share a branch with a fix, that should make all lorawan code look good hopefully. |
ea19998
to
69f23a0
Compare
@0xc0170 Rebased. Please review and CI required. |
@0xc0170 Could you please investigate why it failed ? |
Needs a rebase after another patch made it in. we can then start CI |
@hasnainvirk Looks like another rebase will be needed. |
A few of the structures were missing from the storage space which is visible topublic APIs. Suc structures are now being added.
Travis astyle check pointed out some of the style mismatches in the code. Not all of them are worth changing as they make the code unreadable and some of them are semantically wrong. So in this commit, we have attempted to pick the most important style mismatches and rectify.
If the value is an integer, the 4th bit is used for sign, so you can store values upto 7 only whereas the datarate values could go upto 15. That's why we need to turn this to an unsigned integer so that the last bit can also be used.
Check that ABP dev_addr and nwk_id is non-zero and keys are not null.
69f23a0
to
0f0b3be
Compare
@kjbracey-arm @kivaisan Mind doing a re-review? |
/morph build |
Build : SUCCESSBuild number : 2255 Triggering tests/morph test |
Test : SUCCESSBuild number : 2044 |
Exporter Build : SUCCESSBuild number : 1880 |
Description
This PR fixes a few bugs and does most important style corrections as pointed out by CI.
TARGET: 5.9
Pull request type