Skip to content

Commit 0669ce9

Browse files
committed
js script updated
1 parent 20e4efc commit 0669ce9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

built-in-webpages/setup/build_setup/stringConverter.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ module.exports = {
3737
var dataLength = data.byteLength;
3838
console.log('actualDataLength: ' + dataLength);
3939

40-
var resultString = '#define SETUP_HTML_SIZE ';
41-
resultString += dataLength + '\n'
42-
resultString += 'static const unsigned char SETUP_HTML[] PROGMEM = {\n ';
40+
var resultString = '/* C-file generated by minify.js script */\n\n';
41+
resultString += 'static const unsigned char _acsetup_min_htm[' + dataLength +' + 1] PROGMEM = {\n';
4342
resultString += stringConverter.convert(dataLength, 1, true, 16, data);
4443
resultString += '\n};';
4544
return resultString;

src/AsyncFsWebServer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ bool AsyncFsWebServer::startCaptivePortal(const char* ssid, const char* pass, co
157157
void AsyncFsWebServer::handleWebSocket(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventType type, void * arg, uint8_t * data, size_t len) {
158158
switch (type) {
159159
case WS_EVT_CONNECT:
160-
client->printf("{\"Websocket connected\": true, \"clients\": %"PRIu32"}", client->id());
160+
client->printf("{\"Websocket connected\": true, \"clients\": %" PRIu32 "}", client->id());
161161
break;
162162
case WS_EVT_DISCONNECT:
163163
client->printf("{\"Websocket connected\": false, \"clients\": 0}");
@@ -167,7 +167,7 @@ void AsyncFsWebServer::handleWebSocket(AsyncWebSocket * server, AsyncWebSocketCl
167167
String msg = "";
168168
if(info->final && info->index == 0 && info->len == len){
169169
//the whole message is in a single frame and we got all of it's data
170-
Serial.printf("ws[%s][%"PRIu32"] %s-message[%llu]: ", server->url(), client->id(), (info->opcode == WS_TEXT)?"text":"binary", info->len);
170+
Serial.printf("ws[%s][%" PRIu32 "] %s-message[%llu]: ", server->url(), client->id(), (info->opcode == WS_TEXT)?"text":"binary", info->len);
171171
if (info->opcode == WS_TEXT){
172172
for(size_t i=0; i < info->len; i++) {
173173
msg += (char) data[i];

0 commit comments

Comments
 (0)