Skip to content

Commit 25484e1

Browse files
committed
Revert "fix(logging): Corrected FPS calculation"
This reverts commit 0bb7b95.
1 parent 0bb7b95 commit 25484e1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

libraries/ESP32/examples/Camera/CameraWebServer/app_httpd.cpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,12 @@ static esp_err_t stream_handler(httpd_req_t *req) {
216216
size_t _jpg_buf_len = 0;
217217
uint8_t *_jpg_buf = NULL;
218218
char *part_buf[128];
219+
219220
static int64_t last_frame = 0;
220-
221+
if (!last_frame) {
222+
last_frame = esp_timer_get_time();
223+
}
224+
221225
res = httpd_resp_set_type(req, _STREAM_CONTENT_TYPE);
222226
if (res != ESP_OK) {
223227
return res;
@@ -232,11 +236,6 @@ static esp_err_t stream_handler(httpd_req_t *req) {
232236
#endif
233237

234238
while (true) {
235-
236-
if (!last_frame) {
237-
last_frame = esp_timer_get_time();
238-
}
239-
240239
fb = esp_camera_fb_get();
241240
if (!fb) {
242241
log_e("Camera capture failed");

0 commit comments

Comments
 (0)