CameraWebServer example fix (#6993)
* CameraWebServer compilation fix for verbose debug level * Added missing initializers Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
This commit is contained in:
parent
443158222e
commit
53a097b098
1 changed files with 90 additions and 13 deletions
|
|
@ -148,7 +148,7 @@ static ra_filter_t *ra_filter_init(ra_filter_t *filter, size_t sample_size)
|
||||||
return filter;
|
return filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unused function triggers error
|
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
|
||||||
static int ra_filter_run(ra_filter_t *filter, int value)
|
static int ra_filter_run(ra_filter_t *filter, int value)
|
||||||
{
|
{
|
||||||
if (!filter->values)
|
if (!filter->values)
|
||||||
|
|
@ -166,7 +166,7 @@ static int ra_filter_run(ra_filter_t *filter, int value)
|
||||||
}
|
}
|
||||||
return filter->sum / filter->count;
|
return filter->sum / filter->count;
|
||||||
}
|
}
|
||||||
*/
|
#endif
|
||||||
|
|
||||||
#if CONFIG_ESP_FACE_DETECT_ENABLED
|
#if CONFIG_ESP_FACE_DETECT_ENABLED
|
||||||
#if CONFIG_ESP_FACE_RECOGNITION_ENABLED
|
#if CONFIG_ESP_FACE_RECOGNITION_ENABLED
|
||||||
|
|
@ -1210,67 +1210,144 @@ void startCameraServer()
|
||||||
.uri = "/",
|
.uri = "/",
|
||||||
.method = HTTP_GET,
|
.method = HTTP_GET,
|
||||||
.handler = index_handler,
|
.handler = index_handler,
|
||||||
.user_ctx = NULL};
|
.user_ctx = NULL
|
||||||
|
#ifdef CONFIG_HTTPD_WS_SUPPORT
|
||||||
|
,
|
||||||
|
.is_websocket = true,
|
||||||
|
.handle_ws_control_frames = false,
|
||||||
|
.supported_subprotocol = NULL
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
httpd_uri_t status_uri = {
|
httpd_uri_t status_uri = {
|
||||||
.uri = "/status",
|
.uri = "/status",
|
||||||
.method = HTTP_GET,
|
.method = HTTP_GET,
|
||||||
.handler = status_handler,
|
.handler = status_handler,
|
||||||
.user_ctx = NULL};
|
.user_ctx = NULL
|
||||||
|
#ifdef CONFIG_HTTPD_WS_SUPPORT
|
||||||
|
,
|
||||||
|
.is_websocket = true,
|
||||||
|
.handle_ws_control_frames = false,
|
||||||
|
.supported_subprotocol = NULL
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
httpd_uri_t cmd_uri = {
|
httpd_uri_t cmd_uri = {
|
||||||
.uri = "/control",
|
.uri = "/control",
|
||||||
.method = HTTP_GET,
|
.method = HTTP_GET,
|
||||||
.handler = cmd_handler,
|
.handler = cmd_handler,
|
||||||
.user_ctx = NULL};
|
.user_ctx = NULL
|
||||||
|
#ifdef CONFIG_HTTPD_WS_SUPPORT
|
||||||
|
,
|
||||||
|
.is_websocket = true,
|
||||||
|
.handle_ws_control_frames = false,
|
||||||
|
.supported_subprotocol = NULL
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
httpd_uri_t capture_uri = {
|
httpd_uri_t capture_uri = {
|
||||||
.uri = "/capture",
|
.uri = "/capture",
|
||||||
.method = HTTP_GET,
|
.method = HTTP_GET,
|
||||||
.handler = capture_handler,
|
.handler = capture_handler,
|
||||||
.user_ctx = NULL};
|
.user_ctx = NULL
|
||||||
|
#ifdef CONFIG_HTTPD_WS_SUPPORT
|
||||||
|
,
|
||||||
|
.is_websocket = true,
|
||||||
|
.handle_ws_control_frames = false,
|
||||||
|
.supported_subprotocol = NULL
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
httpd_uri_t stream_uri = {
|
httpd_uri_t stream_uri = {
|
||||||
.uri = "/stream",
|
.uri = "/stream",
|
||||||
.method = HTTP_GET,
|
.method = HTTP_GET,
|
||||||
.handler = stream_handler,
|
.handler = stream_handler,
|
||||||
.user_ctx = NULL};
|
.user_ctx = NULL
|
||||||
|
#ifdef CONFIG_HTTPD_WS_SUPPORT
|
||||||
|
,
|
||||||
|
.is_websocket = true,
|
||||||
|
.handle_ws_control_frames = false,
|
||||||
|
.supported_subprotocol = NULL
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
httpd_uri_t bmp_uri = {
|
httpd_uri_t bmp_uri = {
|
||||||
.uri = "/bmp",
|
.uri = "/bmp",
|
||||||
.method = HTTP_GET,
|
.method = HTTP_GET,
|
||||||
.handler = bmp_handler,
|
.handler = bmp_handler,
|
||||||
.user_ctx = NULL};
|
.user_ctx = NULL
|
||||||
|
#ifdef CONFIG_HTTPD_WS_SUPPORT
|
||||||
|
,
|
||||||
|
.is_websocket = true,
|
||||||
|
.handle_ws_control_frames = false,
|
||||||
|
.supported_subprotocol = NULL
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
httpd_uri_t xclk_uri = {
|
httpd_uri_t xclk_uri = {
|
||||||
.uri = "/xclk",
|
.uri = "/xclk",
|
||||||
.method = HTTP_GET,
|
.method = HTTP_GET,
|
||||||
.handler = xclk_handler,
|
.handler = xclk_handler,
|
||||||
.user_ctx = NULL};
|
.user_ctx = NULL
|
||||||
|
#ifdef CONFIG_HTTPD_WS_SUPPORT
|
||||||
|
,
|
||||||
|
.is_websocket = true,
|
||||||
|
.handle_ws_control_frames = false,
|
||||||
|
.supported_subprotocol = NULL
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
httpd_uri_t reg_uri = {
|
httpd_uri_t reg_uri = {
|
||||||
.uri = "/reg",
|
.uri = "/reg",
|
||||||
.method = HTTP_GET,
|
.method = HTTP_GET,
|
||||||
.handler = reg_handler,
|
.handler = reg_handler,
|
||||||
.user_ctx = NULL};
|
.user_ctx = NULL
|
||||||
|
#ifdef CONFIG_HTTPD_WS_SUPPORT
|
||||||
|
,
|
||||||
|
.is_websocket = true,
|
||||||
|
.handle_ws_control_frames = false,
|
||||||
|
.supported_subprotocol = NULL
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
httpd_uri_t greg_uri = {
|
httpd_uri_t greg_uri = {
|
||||||
.uri = "/greg",
|
.uri = "/greg",
|
||||||
.method = HTTP_GET,
|
.method = HTTP_GET,
|
||||||
.handler = greg_handler,
|
.handler = greg_handler,
|
||||||
.user_ctx = NULL};
|
.user_ctx = NULL
|
||||||
|
#ifdef CONFIG_HTTPD_WS_SUPPORT
|
||||||
|
,
|
||||||
|
.is_websocket = true,
|
||||||
|
.handle_ws_control_frames = false,
|
||||||
|
.supported_subprotocol = NULL
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
httpd_uri_t pll_uri = {
|
httpd_uri_t pll_uri = {
|
||||||
.uri = "/pll",
|
.uri = "/pll",
|
||||||
.method = HTTP_GET,
|
.method = HTTP_GET,
|
||||||
.handler = pll_handler,
|
.handler = pll_handler,
|
||||||
.user_ctx = NULL};
|
.user_ctx = NULL
|
||||||
|
#ifdef CONFIG_HTTPD_WS_SUPPORT
|
||||||
|
,
|
||||||
|
.is_websocket = true,
|
||||||
|
.handle_ws_control_frames = false,
|
||||||
|
.supported_subprotocol = NULL
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
httpd_uri_t win_uri = {
|
httpd_uri_t win_uri = {
|
||||||
.uri = "/resolution",
|
.uri = "/resolution",
|
||||||
.method = HTTP_GET,
|
.method = HTTP_GET,
|
||||||
.handler = win_handler,
|
.handler = win_handler,
|
||||||
.user_ctx = NULL};
|
.user_ctx = NULL
|
||||||
|
#ifdef CONFIG_HTTPD_WS_SUPPORT
|
||||||
|
,
|
||||||
|
.is_websocket = true,
|
||||||
|
.handle_ws_control_frames = false,
|
||||||
|
.supported_subprotocol = NULL
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
ra_filter_init(&ra_filter, 20);
|
ra_filter_init(&ra_filter, 20);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue