From bb870956ee22f6ad9d286c921214062348210abd Mon Sep 17 00:00:00 2001 From: Luc Date: Sat, 22 Jun 2019 18:37:44 +0200 Subject: [PATCH] fix conpilation failed if no wifi --- Grbl_Esp32/commands.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Grbl_Esp32/commands.cpp b/Grbl_Esp32/commands.cpp index 8c0a98e8..1c7dff63 100644 --- a/Grbl_Esp32/commands.cpp +++ b/Grbl_Esp32/commands.cpp @@ -940,11 +940,12 @@ bool COMMANDS::execute_internal_command (int cmd, String cmd_params, level_authe return false; } #endif - int8_t vi; + espresponse->print("{\"EEPROM\":["); if(espresponse->client() != CLIENT_WEBUI)espresponse->println(""); prefs.begin(NAMESPACE, true); #ifdef ENABLE_WIFI + int8_t vi; //1 - Hostname espresponse->print ("{\"F\":\"network\",\"P\":\""); espresponse->print (HOSTNAME_ENTRY); @@ -1223,7 +1224,11 @@ bool COMMANDS::execute_internal_command (int cmd, String cmd_params, level_authe if (! (styp == "B" || styp == "S" || styp == "A" || styp == "I" || styp == "F") ) { response = false; } - if ((sval.length() == 0) && !((spos==AP_PWD_ENTRY) || (spos==STA_PWD_ENTRY))){ + if ((sval.length() == 0) +#if defined (ENABLE_WIFI) + && !((spos==AP_PWD_ENTRY) || (spos==STA_PWD_ENTRY)) +#endif + ){ response = false; }