wifi timeouts, small changes for sd card access
This commit is contained in:
@@ -550,16 +550,20 @@ void DirectoryNode::streamDirectoryHTML(Print &out) const {
|
||||
out.print(F("\"><b>"));
|
||||
out.print(name);
|
||||
out.println(F("</b></li>"));
|
||||
delay(0); // Yield to allow network stack to send buffered data
|
||||
}
|
||||
|
||||
delay(0);
|
||||
|
||||
for (size_t i = 0; i < mp3Files.size(); i++) {
|
||||
out.print(F("<li data-id=\""));
|
||||
out.print(ids[i]);
|
||||
out.print(F("\">"));
|
||||
out.print(mp3Files[i]);
|
||||
out.println(F("</li>"));
|
||||
|
||||
// Yield every few items to allow the async web server to send buffered data
|
||||
if (i % 5 == 4) {
|
||||
delay(1);
|
||||
}
|
||||
}
|
||||
|
||||
for (DirectoryNode* child : subdirectories) {
|
||||
@@ -568,6 +572,7 @@ void DirectoryNode::streamDirectoryHTML(Print &out) const {
|
||||
|
||||
if (name == "/") {
|
||||
out.println(F("</ul>"));
|
||||
delay(0); // Final yield before completing
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user