1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-02 10:53:01 +02:00

More sd_close() to free memory

This commit is contained in:
Mitch Bradley
2020-10-01 09:44:24 -10:00
parent 71bf7dadd0
commit 6828cbc9fe
2 changed files with 4 additions and 0 deletions

View File

@@ -1348,6 +1348,7 @@ namespace WebUI {
s += path;
s += " does not exist on SD Card\"}";
_webserver->send(200, "application/json", s);
sd_close();
return;
}
if (list_files) {
@@ -1426,6 +1427,7 @@ namespace WebUI {
_webserver->send(200, "application/json", jsonfile);
_upload_status = UploadStatusType::NONE;
set_sd_state(SDCARD_IDLE);
sd_close();
}
//SD File upload with direct access to SD///////////////////////////////
@@ -1543,6 +1545,7 @@ namespace WebUI {
if (sdUploadFile) {
sdUploadFile.close();
}
sd_close();
return;
}
}

View File

@@ -737,6 +737,7 @@ namespace WebUI {
ssd += " Total:" + ESPResponseStream::formatBytes(SD.totalBytes());
ssd += "]";
webPrintln(ssd);
sd_close();
return Error::Ok;
}
#endif