Skip to content

Commit 979750b

Browse files
committed
Update comments in WebServer
1 parent bf35950 commit 979750b

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

Firmware/RTK_Everywhere/WebServer.ino

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ static int last_ws_fd;
6363

6464
static TaskHandle_t updateWebServerTaskHandle;
6565
static const uint8_t updateWebServerTaskPriority = 0; // 3 being the highest, and 0 being the lowest
66-
static const int webServerTaskStackSize = 1024 * 4;
67-
static const int webSocketStackSize = 1024 * 20; // Needs to be large enough to hold the file manager file list
66+
static const int webServerTaskStackSize = 1024 * 4; // Needs to be large enough to hold the file manager file list
67+
static const int webSocketStackSize = 1024 * 20; // Needs to be large enough to hold the full settingsCSV
6868

6969
// Inspired by:
7070
// https://github.com/espressif/arduino-esp32/blob/master/libraries/WebServer/examples/MultiHomedServers/MultiHomedServers.ino
@@ -1375,6 +1375,34 @@ static const httpd_uri_t ws = {.uri = "/ws",
13751375
//----------------------------------------
13761376
void httpdDisplayConfig(struct httpd_config *config)
13771377
{
1378+
/*
1379+
httpd_config object:
1380+
5: task_priority
1381+
20480: stack_size
1382+
2147483647: core_id
1383+
81: server_port
1384+
32768: ctrl_port
1385+
7: max_open_sockets
1386+
8: max_uri_handlers
1387+
8: max_resp_headers
1388+
5: backlog_conn
1389+
false: lru_purge_enable
1390+
5: recv_wait_timeout
1391+
5: send_wait_timeout
1392+
0x0: global_user_ctx
1393+
0x0: global_user_ctx_free_fn
1394+
0x0: global_transport_ctx
1395+
0x0: global_transport_ctx_free_fn
1396+
false: enable_so_linger
1397+
0: linger_timeout
1398+
false: keep_alive_enable
1399+
0: keep_alive_idle
1400+
0: keep_alive_interval
1401+
0: keep_alive_count
1402+
0x0: open_fn
1403+
0x0: close_fn
1404+
0x0: uri_match_fn
1405+
*/
13781406
systemPrintf("httpd_config object:\r\n");
13791407
systemPrintf("%10d: task_priority\r\n", config->task_priority);
13801408
systemPrintf("%10d: stack_size\r\n", config->stack_size);
@@ -1416,7 +1444,7 @@ bool websocketServerStart(void)
14161444
// Use different ports for websocket and webServer - use port 81 for the websocket - also defined in main.js
14171445
config.server_port = 81;
14181446

1419-
// Increase the stack size from 4K to handle page processing
1447+
// Increase the stack size from 4K to handle page processing (settingsCSV)
14201448
config.stack_size = webSocketStackSize;
14211449

14221450
// Start the httpd server

0 commit comments

Comments
 (0)