Alten Code gelöscht.

This commit is contained in:
Fabian Schlenz 2022-08-21 17:40:32 +02:00
parent 3272921db2
commit 2908d23e60

View File

@ -6,21 +6,6 @@ PlaylistManager::PlaylistManager() {
SPIMaster::enable_sd(); SPIMaster::enable_sd();
current_rfid_tag_id = String(""); current_rfid_tag_id = String("");
/*
File root = SD.open("/");
while(File entry = root.openNextFile()) {
if (entry.isDirectory()) {
String filename("/");
filename.concat(entry.name());
if (!filename.startsWith("/.")) {
Serial.println(filename);
dirs.push_back(filename);
}
}
}
root.close();
*/
if (!SD.exists("/_mapping.txt")) { if (!SD.exists("/_mapping.txt")) {
Serial.println("WARNING: /_mapping.txt not found!"); Serial.println("WARNING: /_mapping.txt not found!");
} else { } else {
@ -39,19 +24,6 @@ PlaylistManager::PlaylistManager() {
String folder = data.substring(eq + 1); String folder = data.substring(eq + 1);
Serial.printf(" Adding mapping: %s=>%s\n", rfid_id.c_str(), folder.c_str()); Serial.printf(" Adding mapping: %s=>%s\n", rfid_id.c_str(), folder.c_str());
map[rfid_id] = folder; map[rfid_id] = folder;
/*if (folder.charAt(0)=='/') {
bool found=false;
for (String f: dirs) {
if (f.equals(folder)) {
found = true;
break;
}
}
if (!found) {
Serial.printf("WARNING: Found mapping for RFID id %s which maps to non-existing folder %s!\n", rfid_id.c_str(), folder.c_str());
}
}*/
} }
} }
f.close(); f.close();