diff --git a/Grbl_Esp32/src/Grbl.cpp b/Grbl_Esp32/src/Grbl.cpp index 588af68a..50ba2144 100644 --- a/Grbl_Esp32/src/Grbl.cpp +++ b/Grbl_Esp32/src/Grbl.cpp @@ -92,13 +92,13 @@ void grbl_init() { grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "Initializing spindle..."); Spindles::Spindle::select(); - grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "Initializing WiFi-config..."); #ifdef ENABLE_WIFI + grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "Initializing WiFi-config..."); WebUI::wifi_config.begin(); #endif - grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "Initializing Bluetooth..."); #ifdef ENABLE_BLUETOOTH + grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "Initializing Bluetooth..."); WebUI::bt_config.begin(); #endif WebUI::inputBuffer.begin(); diff --git a/Grbl_Esp32/src/Logging.cpp b/Grbl_Esp32/src/Logging.cpp index ce4fe77d..b9cf1283 100644 --- a/Grbl_Esp32/src/Logging.cpp +++ b/Grbl_Esp32/src/Logging.cpp @@ -18,23 +18,24 @@ DebugStream::~DebugStream() { #else # include "Serial.h" +# define LOG_CLIENT CLIENT_SERIAL DebugStream::DebugStream(const char* name) { - client_write(CLIENT_ALL, "[MSG:"); - client_write(CLIENT_ALL, name); - client_write(CLIENT_ALL, ": "); + client_write(LOG_CLIENT, "[MSG:"); + client_write(LOG_CLIENT, name); + client_write(LOG_CLIENT, ": "); } void DebugStream::add(char c) { char txt[2]; txt[0] = c; txt[1] = '\0'; - client_write(CLIENT_ALL, txt); + client_write(LOG_CLIENT, txt); } DebugStream::~DebugStream() { - client_write(CLIENT_ALL, "]"); - client_write(CLIENT_ALL, "\r\n"); + client_write(LOG_CLIENT, "]"); + client_write(LOG_CLIENT, "\r\n"); } #endif diff --git a/Grbl_Esp32/src/Serial.cpp b/Grbl_Esp32/src/Serial.cpp index 394e7f45..2af6444d 100644 --- a/Grbl_Esp32/src/Serial.cpp +++ b/Grbl_Esp32/src/Serial.cpp @@ -172,24 +172,24 @@ void clientCheckTask(void* pvParameters) { } #endif //ENABLE_SD_CARD } - } - } // if something available - WebUI::COMMANDS::handle(); + } // if something available + WebUI::COMMANDS::handle(); #ifdef ENABLE_WIFI - WebUI::wifi_config.handle(); + WebUI::wifi_config.handle(); #endif #ifdef ENABLE_BLUETOOTH - WebUI::bt_config.handle(); + WebUI::bt_config.handle(); #endif #if defined(ENABLE_WIFI) && defined(ENABLE_HTTP) && defined(ENABLE_SERIAL2SOCKET_IN) - WebUI::Serial2Socket.handle_flush(); + WebUI::Serial2Socket.handle_flush(); #endif - vTaskDelay(1 / portTICK_RATE_MS); // Yield to other tasks + vTaskDelay(1 / portTICK_RATE_MS); // Yield to other tasks #ifdef DEBUG_TASK_STACK - static UBaseType_t uxHighWaterMark = 0; - reportTaskStackSize(uxHighWaterMark); + static UBaseType_t uxHighWaterMark = 0; + reportTaskStackSize(uxHighWaterMark); #endif + } } void client_reset_read_buffer(uint8_t client) {