Skip to content

Commit 53505e6

Browse files
committed
Revert "OTA: TEMP debug prints"
This reverts commit 1e125ae3d482a570012d0b4323bb5f9245eaf0dd.
1 parent 79480e2 commit 53505e6

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/ota/implementation/OTASTM32H7.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ OTACloudProcessInterface::State STM32H7OTACloudProcess::startOTA() {
5858
}
5959

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

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

src/ota/interface/OTAInterfaceDefault.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ OTACloudProcessInterface::State OTADefaultCloudProcessInterface::fetch() {
122122
} while((context->downloadState == OtaDownloadFile || context->downloadState == OtaDownloadHeader) &&
123123
millis() - start < downloadTime);
124124

125-
DEBUG_VERBOSE("fetch time %d/%d", millis() - start, downloadTime);
126-
DEBUG_VERBOSE("OTA fetch %d/%d", context->downloadedSize, http_client->contentLength());
127-
128125
// TODO verify that the information present in the ota header match the info in context
129126
if(context->downloadState == OtaDownloadCompleted) {
130127
// Verify that the downloaded file size is matching the expected size ??
@@ -196,9 +193,10 @@ void OTADefaultCloudProcessInterface::parseOta(uint8_t* buffer, size_t buf_len)
196193

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

201197
if((millis() - context->lastReportTime) > 10000) { // Report the download progress each X millisecond
198+
DEBUG_VERBOSE("OTA Download Progress %d/%d", context->downloadedSize, http_client->contentLength());
199+
202200
reportStatus(context->downloadedSize);
203201
context->lastReportTime = millis();
204202
}

0 commit comments

Comments
 (0)