From 117b25ae0788994845bec3565a1b91eb458dbebb Mon Sep 17 00:00:00 2001 From: Jamie Date: Tue, 6 Jan 2026 22:28:15 +0900 Subject: [PATCH] Updated initSd to stop trying when the SD card can be read, but no file system was found (#6) --- src/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 3bfb7e6..9e89a6d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -132,12 +132,17 @@ static void initSd(void) bool ok = false; for (int i = 0; i < 16; i++) { - if (f_mount(&sFatFs, "0:", 1) == FR_OK) + FRESULT mountResult = f_mount(&sFatFs, "0:", 1); + if (mountResult == FR_OK) { ok = true; sIsSdCardMounted = true; break; } + else if (mountResult == FR_NO_FILESYSTEM) + { + break; + } } if (!ok) {