Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f62dde2

Browse files
author
ChenZhengwei20190741
committed
Camera(NT99141):fix konwn bug
1 parent cb1f7b3 commit f62dde2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

driver/camera.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ esp_err_t camera_init(const camera_config_t* config)
12041204
s_state->in_bytes_per_pixel = 2; // camera sends RGB565
12051205
s_state->fb_bytes_per_pixel = 3; // frame buffer stores RGB888
12061206
} else if (pix_format == PIXFORMAT_JPEG) {
1207-
if (s_state->sensor.id.PID != OV2640_PID && s_state->sensor.id.PID != OV3660_PID && s_state->sensor.id.PID != OV5640_PID) {
1207+
if (s_state->sensor.id.PID != OV2640_PID && s_state->sensor.id.PID != OV3660_PID && s_state->sensor.id.PID != OV5640_PID && s_state->sensor.id.PID != NT99141_PID) {
12081208
ESP_LOGE(TAG, "JPEG format is only supported for ov2640, ov3660 and ov5640");
12091209
err = ESP_ERR_NOT_SUPPORTED;
12101210
goto fail;
@@ -1359,6 +1359,8 @@ esp_err_t esp_camera_init(const camera_config_t* config)
13591359
ESP_LOGI(TAG, "Detected OV3660 camera");
13601360
} else if (camera_model == CAMERA_OV5640) {
13611361
ESP_LOGI(TAG, "Detected OV5640 camera");
1362+
} else if (camera_model == CAMERA_NT99141) {
1363+
ESP_LOGI(TAG, "Detected NT99141 camera");
13621364
} else {
13631365
ESP_LOGI(TAG, "Camera not supported");
13641366
err = ESP_ERR_CAMERA_NOT_SUPPORTED;

driver/include/sensor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <stdint.h>
1212
#include <stdbool.h>
1313

14+
#define NT99141_PID (0x14)
1415
#define OV9650_PID (0x96)
1516
#define OV7725_PID (0x77)
1617
#define OV2640_PID (0x26)

0 commit comments

Comments
 (0)