mirror of
https://github.com/Crocmagnon/buzzer.git
synced 2024-11-21 23:48:07 +01:00
Select a file by default
This commit is contained in:
parent
8628357404
commit
fa4bb53060
1 changed files with 15 additions and 0 deletions
15
src/main.cpp
15
src/main.cpp
|
@ -71,6 +71,21 @@ void setup()
|
|||
return;
|
||||
}
|
||||
|
||||
File root = SPIFFS.open("/music");
|
||||
File file = root.openNextFile();
|
||||
while (file)
|
||||
{
|
||||
String fileName = file.name();
|
||||
if (!fileName.startsWith("."))
|
||||
{
|
||||
selectedFile = fileName;
|
||||
Serial.println("Selected " + fileName);
|
||||
break;
|
||||
}
|
||||
file.close();
|
||||
file = root.openNextFile();
|
||||
}
|
||||
|
||||
// Wifi
|
||||
#ifdef B_WIFI_AP
|
||||
Serial.println("Setting up AP...");
|
||||
|
|
Loading…
Reference in a new issue