Skip to content

Commit d79280a

Browse files
Ota interface Default: adding download progress status report
1 parent 7648544 commit d79280a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: src/ota/interface/OTAInterfaceDefault.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,10 @@ void OTADefaultCloudProcessInterface::parseOta(uint8_t* buffer, size_t buf_len)
182182
cursor += buf_len - (cursor-buffer);
183183
context->downloadedSize += (cursor-buffer);
184184

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

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

0 commit comments

Comments
 (0)