Skip to content

Commit

Permalink
Revert "OTA: TEMP debug prints"
Browse files Browse the repository at this point in the history
This reverts commit 1e125ae3d482a570012d0b4323bb5f9245eaf0dd.
  • Loading branch information
pennam committed Jun 4, 2024
1 parent 79480e2 commit 53505e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/ota/implementation/OTASTM32H7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ OTACloudProcessInterface::State STM32H7OTACloudProcess::startOTA() {
}

// this could be useless, since we are writing over it
if (remove(_filename.c_str()) != 0) {
DEBUG_VERBOSE("STM32H7OTA::%s remove error", __FUNCTION__);
}
remove(_filename.c_str());

decompressed = fopen(_filename.c_str(), "wb");

Expand Down
6 changes: 2 additions & 4 deletions src/ota/interface/OTAInterfaceDefault.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ OTACloudProcessInterface::State OTADefaultCloudProcessInterface::fetch() {
} while((context->downloadState == OtaDownloadFile || context->downloadState == OtaDownloadHeader) &&
millis() - start < downloadTime);

DEBUG_VERBOSE("fetch time %d/%d", millis() - start, downloadTime);
DEBUG_VERBOSE("OTA fetch %d/%d", context->downloadedSize, http_client->contentLength());

// TODO verify that the information present in the ota header match the info in context
if(context->downloadState == OtaDownloadCompleted) {
// Verify that the downloaded file size is matching the expected size ??
Expand Down Expand Up @@ -196,9 +193,10 @@ void OTADefaultCloudProcessInterface::parseOta(uint8_t* buffer, size_t buf_len)

cursor += buf_len - (cursor-buffer);
context->downloadedSize += (cursor-buffer);
DEBUG_VERBOSE("OTA Download Progress %d/%d", context->downloadedSize, http_client->contentLength());

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

reportStatus(context->downloadedSize);
context->lastReportTime = millis();
}
Expand Down

0 comments on commit 53505e6

Please sign in to comment.