1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-03 03:13:25 +02:00

Fixed webui

This commit is contained in:
Mitch Bradley
2021-05-22 09:43:07 -10:00
parent baf74070e5
commit b9ca18c68a
3 changed files with 18 additions and 17 deletions

View File

@@ -92,13 +92,13 @@ void grbl_init() {
grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "Initializing spindle..."); grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "Initializing spindle...");
Spindles::Spindle::select(); Spindles::Spindle::select();
grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "Initializing WiFi-config...");
#ifdef ENABLE_WIFI #ifdef ENABLE_WIFI
grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "Initializing WiFi-config...");
WebUI::wifi_config.begin(); WebUI::wifi_config.begin();
#endif #endif
grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "Initializing Bluetooth...");
#ifdef ENABLE_BLUETOOTH #ifdef ENABLE_BLUETOOTH
grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "Initializing Bluetooth...");
WebUI::bt_config.begin(); WebUI::bt_config.begin();
#endif #endif
WebUI::inputBuffer.begin(); WebUI::inputBuffer.begin();

View File

@@ -18,23 +18,24 @@ DebugStream::~DebugStream() {
#else #else
# include "Serial.h" # include "Serial.h"
# define LOG_CLIENT CLIENT_SERIAL
DebugStream::DebugStream(const char* name) { DebugStream::DebugStream(const char* name) {
client_write(CLIENT_ALL, "[MSG:"); client_write(LOG_CLIENT, "[MSG:");
client_write(CLIENT_ALL, name); client_write(LOG_CLIENT, name);
client_write(CLIENT_ALL, ": "); client_write(LOG_CLIENT, ": ");
} }
void DebugStream::add(char c) { void DebugStream::add(char c) {
char txt[2]; char txt[2];
txt[0] = c; txt[0] = c;
txt[1] = '\0'; txt[1] = '\0';
client_write(CLIENT_ALL, txt); client_write(LOG_CLIENT, txt);
} }
DebugStream::~DebugStream() { DebugStream::~DebugStream() {
client_write(CLIENT_ALL, "]"); client_write(LOG_CLIENT, "]");
client_write(CLIENT_ALL, "\r\n"); client_write(LOG_CLIENT, "\r\n");
} }
#endif #endif

View File

@@ -172,24 +172,24 @@ void clientCheckTask(void* pvParameters) {
} }
#endif //ENABLE_SD_CARD #endif //ENABLE_SD_CARD
} }
} } // if something available
} // if something available WebUI::COMMANDS::handle();
WebUI::COMMANDS::handle();
#ifdef ENABLE_WIFI #ifdef ENABLE_WIFI
WebUI::wifi_config.handle(); WebUI::wifi_config.handle();
#endif #endif
#ifdef ENABLE_BLUETOOTH #ifdef ENABLE_BLUETOOTH
WebUI::bt_config.handle(); WebUI::bt_config.handle();
#endif #endif
#if defined(ENABLE_WIFI) && defined(ENABLE_HTTP) && defined(ENABLE_SERIAL2SOCKET_IN) #if defined(ENABLE_WIFI) && defined(ENABLE_HTTP) && defined(ENABLE_SERIAL2SOCKET_IN)
WebUI::Serial2Socket.handle_flush(); WebUI::Serial2Socket.handle_flush();
#endif #endif
vTaskDelay(1 / portTICK_RATE_MS); // Yield to other tasks vTaskDelay(1 / portTICK_RATE_MS); // Yield to other tasks
#ifdef DEBUG_TASK_STACK #ifdef DEBUG_TASK_STACK
static UBaseType_t uxHighWaterMark = 0; static UBaseType_t uxHighWaterMark = 0;
reportTaskStackSize(uxHighWaterMark); reportTaskStackSize(uxHighWaterMark);
#endif #endif
}
} }
void client_reset_read_buffer(uint8_t client) { void client_reset_read_buffer(uint8_t client) {