lewisxhe / esp32-camera-series

🔰 Compatible with all TTGO camera products
MIT License
183 stars 139 forks source link

httpd_resp_sendstr was not declared in this scope #12

Closed QoSi closed 4 years ago

QoSi commented 4 years ago

Hello,

i have the board TTGO_T_CAMERA_V1_7 and want to install esp-who on it to work. but what ever i try over 3days searching in the www going in to a compile error like this or other issues with no find dl_lib.h for example and if the compile is ok the cam work but face recognition not working and some times the board reboots if i make the face detection on... :(

i hope someone can help me with this issue or maybe tel me a step by step tutorial to get esp-who work on this board. thx very mutch

sketch\app_httpd.cpp: In function 'esp_err_t stream_hmi_handler(httpd_req_t*)':

app_httpd.cpp:217:119: error: 'httpd_resp_sendstr' was not declared in this scope

 res = httpd_resp_sendstr(req, "HTTP/1.1 200 OK\r\nContent-Type: multipart/x-mixed-replace; boundary=frame\r\n\r\n");

^ exit status 1 'httpd_resp_sendstr' was not declared in this scope

QoSi commented 4 years ago

Solved

replace in the app_httpd.cpp file

################################################################# res = httpd_resp_sendstr(req, "HTTP/1.1 200 OK\r\nContent-Type: multipart/x-mixed-replace; boundary=frame\r\n\r\n"); if (res != ESP_OK) { return res; } ####################################################################

with #################################################################### const char *resp = "HTTP/1.1 200 OK\r\nContent-Type: multipart/x-mixed-replace; boundary=frame\r\n\r\n"; res = httpd_resp_send(req, resp, strlen(resp)); if (res != ESP_OK) { return res; } ##########################################################################