mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-19 07:37:41 +03:00
fix stack task size after bad merge
This commit is contained in:
parent
b042e3c790
commit
b2985f87d3
@ -414,6 +414,7 @@ int Epub::findVirtualSpineIndex(const std::string& filename) const {
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t Epub::getBookSize() const { return getCumulativeSpineItemSize(getSpineItemsCount() - 1); }
|
size_t Epub::getBookSize() const { return getCumulativeSpineItemSize(getSpineItemsCount() - 1); }
|
||||||
|
|
||||||
// Calculate progress in book
|
// Calculate progress in book
|
||||||
@ -423,4 +424,4 @@ uint8_t Epub::calculateProgress(const int currentSpineIndex, const float current
|
|||||||
size_t bookSize = getBookSize();
|
size_t bookSize = getBookSize();
|
||||||
size_t sectionProgSize = currentSpineRead * curChapterSize;
|
size_t sectionProgSize = currentSpineRead * curChapterSize;
|
||||||
return round(static_cast<float>(prevChapterSize + sectionProgSize) / bookSize * 100.0);
|
return round(static_cast<float>(prevChapterSize + sectionProgSize) / bookSize * 100.0);
|
||||||
}
|
}
|
||||||
@ -46,13 +46,14 @@ void EpubReaderActivity::onEnter() {
|
|||||||
nextPageNumber = data[2] + (data[3] << 8);
|
nextPageNumber = data[2] + (data[3] << 8);
|
||||||
Serial.printf("[%lu] [ERS] Loaded cache: %d, %d\n", millis(), currentSpineIndex, nextPageNumber);
|
Serial.printf("[%lu] [ERS] Loaded cache: %d, %d\n", millis(), currentSpineIndex, nextPageNumber);
|
||||||
f.close();
|
f.close();
|
||||||
|
f.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trigger first update
|
// Trigger first update
|
||||||
updateRequired = true;
|
updateRequired = true;
|
||||||
|
|
||||||
xTaskCreate(&EpubReaderActivity::taskTrampoline, "EpubReaderActivityTask",
|
xTaskCreate(&EpubReaderActivity::taskTrampoline, "EpubReaderActivityTask",
|
||||||
8192, // Stack size
|
24576, // Stack size
|
||||||
this, // Parameters
|
this, // Parameters
|
||||||
1, // Priority
|
1, // Priority
|
||||||
&displayTaskHandle // Task handle
|
&displayTaskHandle // Task handle
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user