From 0669ce9474ccb0ae7839ec7922b2bb8d4503ac6a Mon Sep 17 00:00:00 2001 From: Tolentino Cotesta Date: Sat, 21 Dec 2024 12:03:00 +0100 Subject: [PATCH] js script updated --- built-in-webpages/setup/build_setup/stringConverter.js | 5 ++--- src/AsyncFsWebServer.cpp | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/built-in-webpages/setup/build_setup/stringConverter.js b/built-in-webpages/setup/build_setup/stringConverter.js index 7e7aef6e..ae203ff6 100644 --- a/built-in-webpages/setup/build_setup/stringConverter.js +++ b/built-in-webpages/setup/build_setup/stringConverter.js @@ -37,9 +37,8 @@ module.exports = { var dataLength = data.byteLength; console.log('actualDataLength: ' + dataLength); - var resultString = '#define SETUP_HTML_SIZE '; - resultString += dataLength + '\n' - resultString += 'static const unsigned char SETUP_HTML[] PROGMEM = {\n '; + var resultString = '/* C-file generated by minify.js script */\n\n'; + resultString += 'static const unsigned char _acsetup_min_htm[' + dataLength +' + 1] PROGMEM = {\n'; resultString += stringConverter.convert(dataLength, 1, true, 16, data); resultString += '\n};'; return resultString; diff --git a/src/AsyncFsWebServer.cpp b/src/AsyncFsWebServer.cpp index d600f042..2e7cbf05 100644 --- a/src/AsyncFsWebServer.cpp +++ b/src/AsyncFsWebServer.cpp @@ -157,7 +157,7 @@ bool AsyncFsWebServer::startCaptivePortal(const char* ssid, const char* pass, co void AsyncFsWebServer::handleWebSocket(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventType type, void * arg, uint8_t * data, size_t len) { switch (type) { case WS_EVT_CONNECT: - client->printf("{\"Websocket connected\": true, \"clients\": %"PRIu32"}", client->id()); + client->printf("{\"Websocket connected\": true, \"clients\": %" PRIu32 "}", client->id()); break; case WS_EVT_DISCONNECT: client->printf("{\"Websocket connected\": false, \"clients\": 0}"); @@ -167,7 +167,7 @@ void AsyncFsWebServer::handleWebSocket(AsyncWebSocket * server, AsyncWebSocketCl String msg = ""; if(info->final && info->index == 0 && info->len == len){ //the whole message is in a single frame and we got all of it's data - Serial.printf("ws[%s][%"PRIu32"] %s-message[%llu]: ", server->url(), client->id(), (info->opcode == WS_TEXT)?"text":"binary", info->len); + Serial.printf("ws[%s][%" PRIu32 "] %s-message[%llu]: ", server->url(), client->id(), (info->opcode == WS_TEXT)?"text":"binary", info->len); if (info->opcode == WS_TEXT){ for(size_t i=0; i < info->len; i++) { msg += (char) data[i];