Storage: poll the SD card on its own task

A failed mount retries for ~2.5 s, which froze the UI every 15 s while
no card was inserted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
2026-10-02 10:14:27 +02:00
co-authored by Claude Opus 5.5
parent 987406fa7c
commit 44de78ea62
3 changed files with 50 additions and 14 deletions
+2 -2
View File
@@ -35,7 +35,7 @@ static void draw() {
d.setTextColor(TFT_WHITE);
const auto& b = battery->estimator();
const auto& s = storage->state();
const auto s = storage->state();
int y = 16;
auto line = [&](const String& text) {
d.drawString(text, 4, y);
@@ -122,7 +122,7 @@ void loop() {
if (millis() - lastLog > 5000) {
lastLog = millis();
const auto& s = storage->state();
const auto s = storage->state();
Serial.printf("status: batt %d%% %dmV raw %d | sd %s %d%% total %lluMB | heap %u min %u | screen %d\n",
battery->estimator().percent(), battery->estimator().millivolts(),
battery->lastRawMillivolts(), s.present ? "yes" : "no", s.usedPercent,