@@ -148,7 +148,7 @@ static ra_filter_t *ra_filter_init(ra_filter_t *filter, size_t sample_size)
148148 return filter;
149149}
150150
151- /* unused function triggers error
151+ # if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
152152static int ra_filter_run (ra_filter_t *filter, int value)
153153{
154154 if (!filter->values )
@@ -166,7 +166,7 @@ static int ra_filter_run(ra_filter_t *filter, int value)
166166 }
167167 return filter->sum / filter->count ;
168168}
169- */
169+ # endif
170170
171171#if CONFIG_ESP_FACE_DETECT_ENABLED
172172#if CONFIG_ESP_FACE_RECOGNITION_ENABLED
@@ -1210,67 +1210,144 @@ void startCameraServer()
12101210 .uri = " /" ,
12111211 .method = HTTP_GET,
12121212 .handler = index_handler,
1213- .user_ctx = NULL };
1213+ .user_ctx = NULL
1214+ #ifdef CONFIG_HTTPD_WS_SUPPORT
1215+ ,
1216+ .is_websocket = true ,
1217+ .handle_ws_control_frames = false ,
1218+ .supported_subprotocol = NULL
1219+ #endif
1220+ };
12141221
12151222 httpd_uri_t status_uri = {
12161223 .uri = " /status" ,
12171224 .method = HTTP_GET,
12181225 .handler = status_handler,
1219- .user_ctx = NULL };
1226+ .user_ctx = NULL
1227+ #ifdef CONFIG_HTTPD_WS_SUPPORT
1228+ ,
1229+ .is_websocket = true ,
1230+ .handle_ws_control_frames = false ,
1231+ .supported_subprotocol = NULL
1232+ #endif
1233+ };
12201234
12211235 httpd_uri_t cmd_uri = {
12221236 .uri = " /control" ,
12231237 .method = HTTP_GET,
12241238 .handler = cmd_handler,
1225- .user_ctx = NULL };
1239+ .user_ctx = NULL
1240+ #ifdef CONFIG_HTTPD_WS_SUPPORT
1241+ ,
1242+ .is_websocket = true ,
1243+ .handle_ws_control_frames = false ,
1244+ .supported_subprotocol = NULL
1245+ #endif
1246+ };
12261247
12271248 httpd_uri_t capture_uri = {
12281249 .uri = " /capture" ,
12291250 .method = HTTP_GET,
12301251 .handler = capture_handler,
1231- .user_ctx = NULL };
1252+ .user_ctx = NULL
1253+ #ifdef CONFIG_HTTPD_WS_SUPPORT
1254+ ,
1255+ .is_websocket = true ,
1256+ .handle_ws_control_frames = false ,
1257+ .supported_subprotocol = NULL
1258+ #endif
1259+ };
12321260
12331261 httpd_uri_t stream_uri = {
12341262 .uri = " /stream" ,
12351263 .method = HTTP_GET,
12361264 .handler = stream_handler,
1237- .user_ctx = NULL };
1265+ .user_ctx = NULL
1266+ #ifdef CONFIG_HTTPD_WS_SUPPORT
1267+ ,
1268+ .is_websocket = true ,
1269+ .handle_ws_control_frames = false ,
1270+ .supported_subprotocol = NULL
1271+ #endif
1272+ };
12381273
12391274 httpd_uri_t bmp_uri = {
12401275 .uri = " /bmp" ,
12411276 .method = HTTP_GET,
12421277 .handler = bmp_handler,
1243- .user_ctx = NULL };
1278+ .user_ctx = NULL
1279+ #ifdef CONFIG_HTTPD_WS_SUPPORT
1280+ ,
1281+ .is_websocket = true ,
1282+ .handle_ws_control_frames = false ,
1283+ .supported_subprotocol = NULL
1284+ #endif
1285+ };
12441286
12451287 httpd_uri_t xclk_uri = {
12461288 .uri = " /xclk" ,
12471289 .method = HTTP_GET,
12481290 .handler = xclk_handler,
1249- .user_ctx = NULL };
1291+ .user_ctx = NULL
1292+ #ifdef CONFIG_HTTPD_WS_SUPPORT
1293+ ,
1294+ .is_websocket = true ,
1295+ .handle_ws_control_frames = false ,
1296+ .supported_subprotocol = NULL
1297+ #endif
1298+ };
12501299
12511300 httpd_uri_t reg_uri = {
12521301 .uri = " /reg" ,
12531302 .method = HTTP_GET,
12541303 .handler = reg_handler,
1255- .user_ctx = NULL };
1304+ .user_ctx = NULL
1305+ #ifdef CONFIG_HTTPD_WS_SUPPORT
1306+ ,
1307+ .is_websocket = true ,
1308+ .handle_ws_control_frames = false ,
1309+ .supported_subprotocol = NULL
1310+ #endif
1311+ };
12561312
12571313 httpd_uri_t greg_uri = {
12581314 .uri = " /greg" ,
12591315 .method = HTTP_GET,
12601316 .handler = greg_handler,
1261- .user_ctx = NULL };
1317+ .user_ctx = NULL
1318+ #ifdef CONFIG_HTTPD_WS_SUPPORT
1319+ ,
1320+ .is_websocket = true ,
1321+ .handle_ws_control_frames = false ,
1322+ .supported_subprotocol = NULL
1323+ #endif
1324+ };
12621325
12631326 httpd_uri_t pll_uri = {
12641327 .uri = " /pll" ,
12651328 .method = HTTP_GET,
12661329 .handler = pll_handler,
1267- .user_ctx = NULL };
1330+ .user_ctx = NULL
1331+ #ifdef CONFIG_HTTPD_WS_SUPPORT
1332+ ,
1333+ .is_websocket = true ,
1334+ .handle_ws_control_frames = false ,
1335+ .supported_subprotocol = NULL
1336+ #endif
1337+ };
12681338
12691339 httpd_uri_t win_uri = {
12701340 .uri = " /resolution" ,
12711341 .method = HTTP_GET,
12721342 .handler = win_handler,
1273- .user_ctx = NULL };
1343+ .user_ctx = NULL
1344+ #ifdef CONFIG_HTTPD_WS_SUPPORT
1345+ ,
1346+ .is_websocket = true ,
1347+ .handle_ws_control_frames = false ,
1348+ .supported_subprotocol = NULL
1349+ #endif
1350+ };
12741351
12751352 ra_filter_init (&ra_filter, 20 );
12761353
0 commit comments