Skip to content

Commit

Permalink
Ota interface Default: adding download progress status report
Browse files Browse the repository at this point in the history
  • Loading branch information
andreagilardoni committed Apr 24, 2024
1 parent 3934588 commit e220896
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ota/interface/OTAInterfaceDefault.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ void OTADefaultCloudProcessInterface::parseOta(uint8_t* buffer, size_t buf_len)
cursor += buf_len - (cursor-buffer);
context->downloadedSize += (cursor-buffer);

if((millis() - context->lastReportTime) > 2000) { // Report the download progress each X millisecond
if((millis() - context->lastReportTime) > 10000) { // Report the download progress each X millisecond
DEBUG_VERBOSE("OTA Download Progress %d/%d", context->downloadedSize, http_client->contentLength());

// FIXME the following line enables the report for download progress, it breaks
// reportStatus(context->downloadedSize);
reportStatus(context->downloadedSize);
context->lastReportTime = millis();
}

Expand Down

0 comments on commit e220896

Please sign in to comment.