mirror of
https://github.com/Crocmagnon/buzzer.git
synced 2024-11-21 23:48:07 +01:00
Cleanup setup
This commit is contained in:
parent
b67b057d48
commit
418499aff8
1 changed files with 4 additions and 4 deletions
|
@ -80,13 +80,12 @@ void setup()
|
|||
// List existing files
|
||||
File root = SPIFFS.open("/music");
|
||||
File file = root.openNextFile();
|
||||
while (file)
|
||||
if (file)
|
||||
{
|
||||
String fileName = file.name();
|
||||
if (selectedFile == "" && !fileName.startsWith("."))
|
||||
if (!fileName.startsWith("."))
|
||||
selectedFile = fileName;
|
||||
file.close();
|
||||
file = root.openNextFile();
|
||||
}
|
||||
|
||||
// Wifi
|
||||
|
@ -113,6 +112,7 @@ void setup()
|
|||
server.on("/select-file", HTTP_POST, onSelectFile);
|
||||
server.serveStatic("/", SPIFFS, "/www/").setDefaultFile("index.html");
|
||||
server.begin();
|
||||
|
||||
Serial.println("Server ready!");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue