From ad8cee12ab58bbf94a88ac8ab9d45eced03aa7d2 Mon Sep 17 00:00:00 2001 From: Dave Allie Date: Sat, 6 Dec 2025 20:24:24 +1100 Subject: [PATCH] Small cleanup --- lib/EpdFont/EpdFont.cpp | 1 - lib/Epub/Epub/Section.cpp | 2 -- src/main.cpp | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/EpdFont/EpdFont.cpp b/lib/EpdFont/EpdFont.cpp index 0640b0d..0f53f95 100644 --- a/lib/EpdFont/EpdFont.cpp +++ b/lib/EpdFont/EpdFont.cpp @@ -5,7 +5,6 @@ inline int min(const int a, const int b) { return a < b ? a : b; } inline int max(const int a, const int b) { return a < b ? b : a; } -// TODO: Text properties?? void EpdFont::getTextBounds(const char* string, const int startX, const int startY, int* minX, int* minY, int* maxX, int* maxY) const { *minX = startX; diff --git a/lib/Epub/Epub/Section.cpp b/lib/Epub/Epub/Section.cpp index 1f23f37..00deb51 100644 --- a/lib/Epub/Epub/Section.cpp +++ b/lib/Epub/Epub/Section.cpp @@ -12,8 +12,6 @@ void Section::onPageComplete(const Page* page) { Serial.printf("Page %d complete\n", pageCount); const auto filePath = cachePath + "/page_" + std::to_string(pageCount) + ".bin"; - // TODO can this be removed? - SD.open(filePath.c_str(), FILE_WRITE).close(); std::ofstream outputFile("/sd" + filePath); page->serialize(outputFile); diff --git a/src/main.cpp b/src/main.cpp index 1ac0288..40b478f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -205,7 +205,7 @@ void loop() { delay(10); static unsigned long lastMemPrint = 0; - if (Serial && millis() - lastMemPrint >= 2000) { + if (Serial && millis() - lastMemPrint >= 5000) { Serial.printf("[%lu] Memory - Free: %d bytes, Total: %d bytes, Min Free: %d bytes\n", millis(), ESP.getFreeHeap(), ESP.getHeapSize(), ESP.getMinFreeHeap()); lastMemPrint = millis();