Skip to content

Commit f015004

Browse files
authored
Merge pull request #787 from RubenKelevra/feat/reduce_stack_usage_of_log_messages
replace Log message handler with a more lightweight version
2 parents 307bcc0 + 0305aca commit f015004

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

driver/cam_hal.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ static void cam_task(void *arg)
255255
if (cam_event == CAM_IN_SUC_EOF_EVENT) {
256256
if(!cam_obj->psram_mode){
257257
if (cam_obj->fb_size < (frame_buffer_event->len + pixels_per_dma)) {
258-
ESP_LOGW(TAG, "FB-OVF");
258+
ESP_CAMERA_ETS_PRINTF(DRAM_STR("cam_hal: FB-OVF\r\n"));
259259
ll_cam_stop(cam_obj);
260260
continue;
261261
}
@@ -333,7 +333,7 @@ static void cam_task(void *arg)
333333
if (cam_obj->jpeg_mode) {
334334
if (!cam_obj->psram_mode) {
335335
if (cam_obj->fb_size < (frame_buffer_event->len + pixels_per_dma)) {
336-
ESP_LOGW(TAG, "FB-OVF");
336+
ESP_CAMERA_ETS_PRINTF(DRAM_STR("cam_hal: FB-OVF\r\n"));
337337
cnt--;
338338
} else {
339339
frame_buffer_event->len += ll_cam_memcpy(cam_obj,
@@ -356,7 +356,7 @@ static void cam_task(void *arg)
356356
} else if (!cam_obj->jpeg_mode) {
357357
if (frame_buffer_event->len != cam_obj->fb_size) {
358358
cam_obj->frames[frame_pos].en = 1;
359-
ESP_LOGE(TAG, "FB-SIZE: %u != %u", frame_buffer_event->len, (unsigned) cam_obj->fb_size);
359+
ESP_CAMERA_ETS_PRINTF(DRAM_STR("cam_hal: FB-SIZE: %u != %u\r\n"), frame_buffer_event->len, (unsigned) cam_obj->fb_size);
360360
}
361361
}
362362
//send frame
@@ -367,14 +367,14 @@ static void cam_task(void *arg)
367367
//push the new frame to the end of the queue
368368
if (xQueueSend(cam_obj->frame_buffer_queue, (void *)&frame_buffer_event, 0) != pdTRUE) {
369369
cam_obj->frames[frame_pos].en = 1;
370-
ESP_LOGE(TAG, "FBQ-SND");
370+
ESP_CAMERA_ETS_PRINTF(DRAM_STR("cam_hal: FBQ-SND\r\n"));
371371
}
372372
//free the popped buffer
373373
cam_give(fb2);
374374
} else {
375375
//queue is full and we could not pop a frame from it
376376
cam_obj->frames[frame_pos].en = 1;
377-
ESP_LOGE(TAG, "FBQ-RCV");
377+
ESP_CAMERA_ETS_PRINTF(DRAM_STR("cam_hal: FBQ-RCV\r\n"));
378378
}
379379
}
380380
}

0 commit comments

Comments
 (0)