From 448e3339d1a45ccb25cae013efb632fc0ac923bc Mon Sep 17 00:00:00 2001 From: Mitch Bradley Date: Tue, 6 Oct 2020 14:10:11 -1000 Subject: [PATCH] Apply idle/alarm checks to SPIFFS files too --- Grbl_Esp32/src/WebUI/WebSettings.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Grbl_Esp32/src/WebUI/WebSettings.cpp b/Grbl_Esp32/src/WebUI/WebSettings.cpp index 4a9f5cbf..3bda137c 100644 --- a/Grbl_Esp32/src/WebUI/WebSettings.cpp +++ b/Grbl_Esp32/src/WebUI/WebSettings.cpp @@ -289,6 +289,10 @@ namespace WebUI { } static Error runLocalFile(char* parameter, AuthenticationLevel auth_level) { // ESP700 + if (sys.state != State::Idle) { + webPrintln("Busy"); + return Error::IdleError; + } String path = trim(parameter); if ((path.length() > 0) && (path[0] != '/')) { path = "/" + path; @@ -322,6 +326,9 @@ namespace WebUI { } static Error showLocalFile(char* parameter, AuthenticationLevel auth_level) { // ESP701 + if (sys.state != State::Idle && sys.state != State::Alarm) { + return Error::IdleError; + } String path = trim(parameter); if ((path.length() > 0) && (path[0] != '/')) { path = "/" + path;