mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-03 03:13:25 +02:00
Apply idle/alarm checks to SPIFFS files too
This commit is contained in:
@@ -289,6 +289,10 @@ namespace WebUI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Error runLocalFile(char* parameter, AuthenticationLevel auth_level) { // ESP700
|
static Error runLocalFile(char* parameter, AuthenticationLevel auth_level) { // ESP700
|
||||||
|
if (sys.state != State::Idle) {
|
||||||
|
webPrintln("Busy");
|
||||||
|
return Error::IdleError;
|
||||||
|
}
|
||||||
String path = trim(parameter);
|
String path = trim(parameter);
|
||||||
if ((path.length() > 0) && (path[0] != '/')) {
|
if ((path.length() > 0) && (path[0] != '/')) {
|
||||||
path = "/" + path;
|
path = "/" + path;
|
||||||
@@ -322,6 +326,9 @@ namespace WebUI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Error showLocalFile(char* parameter, AuthenticationLevel auth_level) { // ESP701
|
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);
|
String path = trim(parameter);
|
||||||
if ((path.length() > 0) && (path[0] != '/')) {
|
if ((path.length() > 0) && (path[0] != '/')) {
|
||||||
path = "/" + path;
|
path = "/" + path;
|
||||||
|
Reference in New Issue
Block a user