Skip to content

Commit

Permalink
Revert "fix(logging): Corrected FPS calculation"
Browse files Browse the repository at this point in the history
This reverts commit 0bb7b95.
  • Loading branch information
TNeutron committed Jan 31, 2025
1 parent 0bb7b95 commit 25484e1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions libraries/ESP32/examples/Camera/CameraWebServer/app_httpd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,12 @@ static esp_err_t stream_handler(httpd_req_t *req) {
size_t _jpg_buf_len = 0;
uint8_t *_jpg_buf = NULL;
char *part_buf[128];

static int64_t last_frame = 0;

if (!last_frame) {
last_frame = esp_timer_get_time();
}

res = httpd_resp_set_type(req, _STREAM_CONTENT_TYPE);
if (res != ESP_OK) {
return res;
Expand All @@ -232,11 +236,6 @@ static esp_err_t stream_handler(httpd_req_t *req) {
#endif

while (true) {

if (!last_frame) {
last_frame = esp_timer_get_time();
}

fb = esp_camera_fb_get();
if (!fb) {
log_e("Camera capture failed");
Expand Down

0 comments on commit 25484e1

Please sign in to comment.