From b2985f87d3946bd8f78c3587406a25afb8934086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Launay?= Date: Wed, 17 Dec 2025 23:23:35 +0100 Subject: [PATCH] fix stack task size after bad merge --- lib/Epub/Epub.cpp | 3 ++- src/activities/reader/EpubReaderActivity.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Epub/Epub.cpp b/lib/Epub/Epub.cpp index 42024a5..3b75453 100644 --- a/lib/Epub/Epub.cpp +++ b/lib/Epub/Epub.cpp @@ -414,6 +414,7 @@ int Epub::findVirtualSpineIndex(const std::string& filename) const { } return -1; } + size_t Epub::getBookSize() const { return getCumulativeSpineItemSize(getSpineItemsCount() - 1); } // Calculate progress in book @@ -423,4 +424,4 @@ uint8_t Epub::calculateProgress(const int currentSpineIndex, const float current size_t bookSize = getBookSize(); size_t sectionProgSize = currentSpineRead * curChapterSize; return round(static_cast(prevChapterSize + sectionProgSize) / bookSize * 100.0); -} +} \ No newline at end of file diff --git a/src/activities/reader/EpubReaderActivity.cpp b/src/activities/reader/EpubReaderActivity.cpp index de5c838..636dc84 100644 --- a/src/activities/reader/EpubReaderActivity.cpp +++ b/src/activities/reader/EpubReaderActivity.cpp @@ -46,13 +46,14 @@ void EpubReaderActivity::onEnter() { nextPageNumber = data[2] + (data[3] << 8); Serial.printf("[%lu] [ERS] Loaded cache: %d, %d\n", millis(), currentSpineIndex, nextPageNumber); f.close(); + f.close(); } // Trigger first update updateRequired = true; xTaskCreate(&EpubReaderActivity::taskTrampoline, "EpubReaderActivityTask", - 8192, // Stack size + 24576, // Stack size this, // Parameters 1, // Priority &displayTaskHandle // Task handle