-
Notifications
You must be signed in to change notification settings - Fork 78
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
OTA: chunked download #520
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #520 +/- ##
=======================================
Coverage 95.39% 95.39%
=======================================
Files 33 33
Lines 1520 1520
=======================================
Hits 1450 1450
Misses 70 70 ☔ View full report in Codecov by Sentry. |
@andreagilardoni would it be better to use |
I think you are right! this could be a good use for them, since they are designed to accommodate settings for the OtaProcedure |
Memory usage change @ 0f53459
Click for full report table
Click for full report CSV
|
This pull request introduces several changes to the OTA update process in the Arduino IoT Cloud library. The key changes focus on improving the reliability of OTA updates by adding support for chunked downloads and refining OTA policy management.
Improvements to OTA policy management:
src/ArduinoIoTCloudTCP.h
: ReplacedsetOtaPolicies
withenableOtaPolicy
anddisableOtaPolicy
methods to manage OTA policies more flexibly. Added a new methodsetOTAChunkMode
to enable or disable chunked downloads.src/ota/interface/OTAInterface.cpp
: Updated theotaAvailable
method to use the newgetOtaPolicy
method for checking OTA policies.src/ota/interface/OTAInterface.h
: Added new methodsenableOtaPolicy
,disableOtaPolicy
, andgetOtaPolicy
to manage OTA policies. Introduced a newChunkDownload
flag for chunked downloads.Enhancements to OTA download process:
src/ota/interface/OTAInterfaceDefault.cpp
: Refactored thestartOTA
andfetch
methods to support chunked downloads. Added a new methodrequestOta
to handle HTTP requests for OTA updates, including chunked requests.src/ota/interface/OTAInterfaceDefault.h
: Added new constants and methods to support chunked downloads, includingmaxChunkSize
,requestOta
, andfetchMore
. Updated theContext
struct to include new fields for managing chunked downloads.