From 67f8e7aab42913401ba114442ef5ceb396af7ebf Mon Sep 17 00:00:00 2001 From: Mitch Bradley Date: Thu, 18 Feb 2021 15:42:44 -1000 Subject: [PATCH 1/2] SD Upload fix by luc (#779) --- Grbl_Esp32/src/Grbl.h | 4 ++-- Grbl_Esp32/src/WebUI/WebServer.cpp | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Grbl_Esp32/src/Grbl.h b/Grbl_Esp32/src/Grbl.h index 46614405..c32b5f50 100644 --- a/Grbl_Esp32/src/Grbl.h +++ b/Grbl_Esp32/src/Grbl.h @@ -21,8 +21,8 @@ */ // Grbl versioning system - -const char* const GRBL_VERSION_BUILD = "20210213"; +const char* const GRBL_VERSION = "1.3a"; +const char* const GRBL_VERSION_BUILD = "20210218"; //#include #include diff --git a/Grbl_Esp32/src/WebUI/WebServer.cpp b/Grbl_Esp32/src/WebUI/WebServer.cpp index 97b2ca34..311c980a 100644 --- a/Grbl_Esp32/src/WebUI/WebServer.cpp +++ b/Grbl_Esp32/src/WebUI/WebServer.cpp @@ -280,7 +280,14 @@ namespace WebUI { if ((path.substring(0, 4) == "/SD/")) { //remove /SD path = path.substring(3); + if (SDState::Idle != get_sd_state(true)) { + String content = "cannot open: "; + content += path + ", SD is not available."; + + _webserver->send(500, "text/plain", content); + } if (SD.exists(pathWithGz) || SD.exists(path)) { + set_sd_state(SDState::BusyUploading); if (SD.exists(pathWithGz)) { path = pathWithGz; } @@ -311,8 +318,10 @@ namespace WebUI { if (i != totalFileSize) { //error: TBD } + set_sd_state(SDState::Idle); return; } + set_sd_state(SDState::Idle); } String content = "cannot find "; content += path; From 5bc3cf819b27b892c46a1394ebbb1798b2feee8e Mon Sep 17 00:00:00 2001 From: Florian Ragwitz Date: Fri, 19 Feb 2021 09:12:21 -0800 Subject: [PATCH 2/2] Configure motors after I/O pins (#742) So machine definitions can change the SPI pins before we talk to any Trinamic drivers. --- Grbl_Esp32/src/Grbl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Grbl_Esp32/src/Grbl.cpp b/Grbl_Esp32/src/Grbl.cpp index a338766f..be3d311d 100644 --- a/Grbl_Esp32/src/Grbl.cpp +++ b/Grbl_Esp32/src/Grbl.cpp @@ -39,8 +39,8 @@ void grbl_init() { #endif settings_init(); // Load Grbl settings from non-volatile storage stepper_init(); // Configure stepper pins and interrupt timers - init_motors(); system_ini(); // Configure pinout pins and pin-change interrupt (Renamed due to conflict with esp32 files) + init_motors(); memset(sys_position, 0, sizeof(sys_position)); // Clear machine position. machine_init(); // weak definition in Grbl.cpp does nothing // Initialize system state.