@@ -148,7 +148,7 @@ static ra_filter_t *ra_filter_init(ra_filter_t *filter, size_t sample_size)
148
148
return filter;
149
149
}
150
150
151
- /* unused function triggers error
151
+ # if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
152
152
static int ra_filter_run (ra_filter_t *filter, int value)
153
153
{
154
154
if (!filter->values )
@@ -166,7 +166,7 @@ static int ra_filter_run(ra_filter_t *filter, int value)
166
166
}
167
167
return filter->sum / filter->count ;
168
168
}
169
- */
169
+ # endif
170
170
171
171
#if CONFIG_ESP_FACE_DETECT_ENABLED
172
172
#if CONFIG_ESP_FACE_RECOGNITION_ENABLED
@@ -1210,67 +1210,144 @@ void startCameraServer()
1210
1210
.uri = " /" ,
1211
1211
.method = HTTP_GET,
1212
1212
.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
+ };
1214
1221
1215
1222
httpd_uri_t status_uri = {
1216
1223
.uri = " /status" ,
1217
1224
.method = HTTP_GET,
1218
1225
.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
+ };
1220
1234
1221
1235
httpd_uri_t cmd_uri = {
1222
1236
.uri = " /control" ,
1223
1237
.method = HTTP_GET,
1224
1238
.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
+ };
1226
1247
1227
1248
httpd_uri_t capture_uri = {
1228
1249
.uri = " /capture" ,
1229
1250
.method = HTTP_GET,
1230
1251
.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
+ };
1232
1260
1233
1261
httpd_uri_t stream_uri = {
1234
1262
.uri = " /stream" ,
1235
1263
.method = HTTP_GET,
1236
1264
.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
+ };
1238
1273
1239
1274
httpd_uri_t bmp_uri = {
1240
1275
.uri = " /bmp" ,
1241
1276
.method = HTTP_GET,
1242
1277
.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
+ };
1244
1286
1245
1287
httpd_uri_t xclk_uri = {
1246
1288
.uri = " /xclk" ,
1247
1289
.method = HTTP_GET,
1248
1290
.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
+ };
1250
1299
1251
1300
httpd_uri_t reg_uri = {
1252
1301
.uri = " /reg" ,
1253
1302
.method = HTTP_GET,
1254
1303
.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
+ };
1256
1312
1257
1313
httpd_uri_t greg_uri = {
1258
1314
.uri = " /greg" ,
1259
1315
.method = HTTP_GET,
1260
1316
.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
+ };
1262
1325
1263
1326
httpd_uri_t pll_uri = {
1264
1327
.uri = " /pll" ,
1265
1328
.method = HTTP_GET,
1266
1329
.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
+ };
1268
1338
1269
1339
httpd_uri_t win_uri = {
1270
1340
.uri = " /resolution" ,
1271
1341
.method = HTTP_GET,
1272
1342
.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
+ };
1274
1351
1275
1352
ra_filter_init (&ra_filter, 20 );
1276
1353
0 commit comments