8000 Update GeneralUtils.cpp · CLPopescu-1999-02/esp32-snippets@83ca169 · GitHub
[go: up one dir, main page]

Skip to content

Commit 83ca169

Browse files
authored
Update GeneralUtils.cpp
Changed ESP_LOGD to ESP_LOGV to lower logging level
1 parent 2b7d590 commit 83ca169

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

cpp_utils/GeneralUtils.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ void GeneralUtils::dumpInfo() {
109109
size_t freeHeap = heap_caps_get_free_size(MALLOC_CAP_8BIT);
110110
esp_chip_info_t chipInfo;
111111
esp_chip_info(&chipInfo);
112-
ESP_LOGD(LOG_TAG, "--- dumpInfo ---");
113-
ESP_LOGD(LOG_TAG, "Free heap: %d", freeHeap);
114-
ESP_LOGD(LOG_TAG, "Chip Info: Model: %d, cores: %d, revision: %d", chipInfo.model, chipInfo.cores, chipInfo.revision);
115-
ESP_LOGD(LOG_TAG, "ESP-IDF version: %s", esp_get_idf_version());
116-
ESP_LOGD(LOG_TAG, "---");
112+
ESP_LOGV(LOG_TAG, "--- dumpInfo ---");
113+
ESP_LOGV(LOG_TAG, "Free heap: %d", freeHeap);
114+
ESP_LOGV(LOG_TAG, "Chip Info: Model: %d, cores: %d, revision: %d", chipInfo.model, chipInfo.cores, chipInfo.revision);
115+
ESP_LOGV(LOG_TAG, "ESP-IDF version: %s", esp_get_idf_version());
116+
ESP_LOGV(LOG_TAG, "---");
117117
} // dumpInfo
118118

119119

@@ -231,7 +231,7 @@ void GeneralUtils::hexDump(uint8_t* pData, uint32_t length) {
231231
if (index % 16 == 0) {
232232
strcpy(hexBuf, hex.str().c_str());
233233
strcpy(asciiBuf, ascii.str().c_str());
234-
ESP_LOGD(tag, "%s %s", hexBuf, asciiBuf);
234+
ESP_LOGV(tag, "%s %s", hexBuf, asciiBuf);
235235
hex.str("");
236236
ascii.str("");
237237
}
@@ -243,8 +243,8 @@ void GeneralUtils::hexDump(uint8_t* pData, uint32_t length) {
243243
}
244244
strcpy(hexBuf, hex.str().c_str());
245245
strcpy(asciiBuf, ascii.str().c_str());
246-
ESP_LOGD(tag, "%s %s", hexBuf, asciiBuf);
247-
//ESP_LOGD(tag, "%s %s", hex.str().c_str(), ascii.str().c_str());
246+
ESP_LOGV(tag, "%s %s", hexBuf, asciiBuf);
247+
//ESP_LOGV(tag, "%s %s", hex.str().c_str(), ascii.str().c_str());
248248
}
249249
FreeRTOS::sleep(1000);
250250
}
@@ -266,7 +266,7 @@ void GeneralUtils::hexDump(uint8_t* pData, uint32_t length) {
266266
}
267267
index++;
268268
if (index % 16 == 0) {
269-
ESP_LOGD(tag, "%s %s", hex.str().c_str(), ascii.str().c_str());
269+
ESP_LOGV(tag, "%s %s", hex.str().c_str(), ascii.str().c_str());
270270
hex.str("");
271271
ascii.str("");
272272
}
@@ -276,7 +276,7 @@ void GeneralUtils::hexDump(uint8_t* pData, uint32_t length) {
276276
hex << " ";
277277
index++;
278278
}
279-
ESP_LOGD(tag, "%s %s", hex.str().c_str(), ascii.str().c_str());
279+
ESP_LOGV(tag, "%s %s", hex.str().c_str(), ascii.str().c_str());
280280
}
281281
FreeRTOS::sleep(1000);
282282
}
@@ -296,8 +296,8 @@ void GeneralUtils::hexDump(const uint8_t* pData, uint32_t length) {
296296
char tempBuf[80];
297297
uint32_t lineNumber = 0;
298298

299-
ESP_LOGD(LOG_TAG, " 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f");
300-
ESP_LOGD(LOG_TAG, " -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --");
299+
ESP_LOGV(LOG_TAG, " 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f");
300+
ESP_LOGV(LOG_TAG, " -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --");
301301
strcpy(ascii, "");
302302
strcpy(hex, "");
303303
uint32_t index=0;
@@ -312,7 +312,7 @@ void GeneralUtils::hexDump(const uint8_t* pData, uint32_t length) {
312312
strcat(ascii, tempBuf);
313313
index++;
314314
if (index % 16 == 0) {
315-
ESP_LOGD(LOG_TAG, "%.4x %s %s", lineNumber*16, hex, ascii);
315+
ESP_LOGV(LOG_TAG, "%.4x %s %s", lineNumber*16, hex, ascii);
316316
strcpy(ascii, "");
317317
strcpy(hex, "");
318318
lineNumber++;
@@ -323,7 +323,7 @@ void GeneralUtils::hexDump(const uint8_t* pData, uint32_t length) {
323323
strcat(hex, " ");
324324
index++;
325325
}
326-
ESP_LOGD(LOG_TAG, "%.4x %s %s", lineNumber*16, hex, ascii);
326+
ESP_LOGV(LOG_TAG, "%.4x %s %s", lineNumber*16, hex, ascii);
327327
}
328328
} // hexDump
329329

0 commit comments

Comments
 (0)
0