Skip to content

Commit fa8f15e

Browse files
committed
fix: Address code review findings from GitHub Copilot
- Remove duplicate register 0x395f writes in all three format arrays - Remove duplicate OV02C10_SENSOR_NAME definition (line 68) - Fix double semicolon in exposure step assignment (line 1260) These were identified by GitHub Copilot automated code review.
1 parent dddc26e commit fa8f15e

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

esp_cam_sensor/sensors/ov02c10/ov02c10.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ struct ov02c10_cam {
6565
((int32_t)(((double)v) * 1000000 / (sf)->fps / (sf)->isp_info->isp_v1_info.vts / EXPOSURE_V4L2_UNIT_US + 0.5))
6666

6767
#define OV02C10_PID 0x5602
68-
#define OV02C10_SENSOR_NAME "OV02C10"
6968
#define OV02C10_AE_TARGET_DEFAULT (0x50)
7069

7170
#ifndef portTICK_RATE_MS
@@ -1257,7 +1256,7 @@ static esp_err_t ov02c10_query_para_desc(esp_cam_sensor_device_t *dev, esp_cam_s
12571256
qdesc->type = ESP_CAM_SENSOR_PARAM_TYPE_NUMBER;
12581257
qdesc->number.minimum = s_ov02c10_exp_min;
12591258
qdesc->number.maximum = dev->cur_format->isp_info->isp_v1_info.vts - OV02C10_EXP_MAX_OFFSET; // max = VTS-6 = height+vblank-6, so when update vblank, exposure_max must be updated
1260-
qdesc->number.step = 1;;
1259+
qdesc->number.step = 1;
12611260
qdesc->default_value = dev->cur_format->isp_info->isp_v1_info.exp_def;
12621261
break;
12631262
case ESP_CAM_SENSOR_EXPOSURE_US:

esp_cam_sensor/sensors/ov02c10/private_include/ov02c10_settings.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@
180180
{0x395d, 0x05},
181181
{0x395e, 0x02},
182182
{0x395f, 0x00},
183-
{0x395f, 0x00},
184183
{0x3960, 0x00},
185184
{0x3961, 0x00},
186185
{0x3962, 0x00},
@@ -409,7 +408,6 @@
409408
{0x395d, 0x05},
410409
{0x395e, 0x02},
411410
{0x395f, 0x00},
412-
{0x395f, 0x00},
413411
{0x3960, 0x00},
414412
{0x3961, 0x00},
415413
{0x3962, 0x00},
@@ -651,7 +649,6 @@
651649
{0X395d, 0X05},
652650
{0X395e, 0X02},
653651
{0X395f, 0X00},
654-
{0X395f, 0X00},
655652
{0X3960, 0X00},
656653
{0X3961, 0X00},
657654
{0X3962, 0X00},

0 commit comments

Comments
 (0)