mirror of
https://github.com/Crocmagnon/buzzer.git
synced 2024-11-22 07:58:02 +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;
|
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
|
// Wifi
|
||||||
#ifdef B_WIFI_AP
|
#ifdef B_WIFI_AP
|
||||||
Serial.println("Setting up AP...");
|
Serial.println("Setting up AP...");
|
||||||
|
|
Loading…
Reference in a new issue