-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
samples: cellular: http_update: modem DFU samples refactoring #11036
samples: cellular: http_update: modem DFU samples refactoring #11036
Conversation
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publishing GitHub Action. |
21b81e3
to
104f88b
Compare
104f88b
to
aadc31c
Compare
aadc31c
to
d79b969
Compare
d79b969
to
2b486a5
Compare
2b486a5
to
54dc31a
Compare
@richardmccrae-nordicsemi This PR changes the name of the |
Test specificationCI/Jenkins/NRF
CI/Jenkins/integration
Detailed information of selected test modules Note: This message is automatically posted and updated by the CI |
76bb882
to
fe13a4f
Compare
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.
Have left some comments, please check if they apply to more than one main.c
file.
while (1) { | ||
k_sleep(K_FOREVER); | ||
} |
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.
Can't we just return
?
if (err != 0) { | ||
printk("fota_download_init() failed, err %d\n", err); | ||
return 0; |
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.
return err
?
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.
Actually, I am wondering if this is the correct one and main should return 0 in all cases.
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.
In theory main()
is just like any other function, so we can return zero on success and non-zero on error.
|
||
printk("LTE Link Connecting ...\n"); | ||
err = lte_lc_init_and_connect_async(lte_lc_handler); | ||
__ASSERT(err == 0, "LTE link could not be established."); |
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.
We could clean this up, and do proper error checking instead (above too)
0bcc062
to
be28814
Compare
HTTP Update automated samples passing with this PR |
printk("LTE link could not be established."); | ||
return err; | ||
} | ||
printk("LTE Link Connected!\n"); |
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.
Compiler warning:
../src/main.c: In function 'modem_configure_and_connect':
../src/main.c:280:1: warning: control reaches end of non-void function [-Wreturn-type]
280 | }
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.
Same goes for function in modem_full_update/src/main.c:392
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.
Yes, I will push an update shortly.
be28814
to
e8e4f3b
Compare
printk("LTE link could not be established."); | ||
return err; | ||
} | ||
printk("LTE Link Connected!\n"); |
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.
Same goes for function in modem_full_update/src/main.c:392
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
2b93f27
to
d706ed0
Compare
Don't know why the DNM label is not removed, as the manifest change is removed. |
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.
some minor comments.
c93431f
to
0145136
Compare
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.
LGTM
030824c
to
06ee2c0
Compare
* With changes to the modem firmware and integration it is not necessary to reboot the application to perform a modem firmware update. This commit refactors the full and delta modem firmware update samples to only reinitialize the modem and modem library when performing the update. * With changes to full and delta modem firmware update samples, this was the only sample using the common folder so this is merged into the application. Restructure the sample to align with the modem firmware update samples. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
06ee2c0
to
90eada8
Compare
With changes to the modem firmware and integration it is not necessary to reboot the application to perform a modem firmware
update. This PR refactors the delta and full modem firmware update samples to only reinitialize the modem and modem library when performing the update.