Skip to content

Commit a4e3d91

Browse files
committed
Adjusted serial config
1 parent 6d65b30 commit a4e3d91

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/main.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ void setup() {
106106
static bool serialInitialized = false;
107107
if (!serialInitialized) {
108108
Serial.begin(115200);
109-
ESP_LOGI(TAG, "Serial initialized");
109+
size_t txBuffer = Serial.setTxBufferSize(1024);
110+
ESP_LOGI(TAG, "Serial initialized @ %d baud w/ buffer size %d",
111+
Serial.baudRate(), txBuffer);
110112
serialInitialized = true;
111113
}
112114

@@ -512,7 +514,7 @@ constexpr uint32_t LOG_ITEM_INTERVAL_MS =
512514
sizeof(statsBuffer) - usedBytes);
513515
ESP_LOGD(TAG, "Stats Buffer Size: %d", sizeof(statsBuffer));
514516
ESP_LOGI(TAG, "Task Run Time Stats:\n%s", statsBuffer);
515-
Serial.flush();
517+
// Serial.flush();
516518
delay(LOG_ITEM_INTERVAL_MS);
517519

518520
for (TaskInfo *taskDesc : load.mainTaskDescriptions) {
@@ -533,7 +535,7 @@ constexpr uint32_t LOG_ITEM_INTERVAL_MS =
533535
taskDesc->minFreeStack_Bytes,
534536
taskDesc->minFreeStack_Bytes);
535537
}
536-
Serial.flush();
538+
// Serial.flush();
537539
delay(LOG_ITEM_INTERVAL_MS);
538540
}
539541
// else {

0 commit comments

Comments
 (0)