Skip to content

Commit 64e8b61

Browse files
committed
fix: fix some compilation errors
1 parent 9a7ee24 commit 64e8b61

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

sensors/hm0360.c

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,31 @@ static int set_dummy(sensor_t *sensor, int val)
368368
return -1;
369369
}
370370

371+
static int set_gainceiling_dummy(sensor_t *sensor, gainceiling_t val)
372+
{
373+
ESP_LOGW(TAG, "Unsupported");
374+
return -1;
375+
}
376+
371377
static int init_status(sensor_t *sensor)
372378
{
379+
(void) write_addr_reg;
380+
381+
sensor->status.brightness = 0;
382+
sensor->status.contrast = 0;
383+
sensor->status.saturation = 0;
384+
sensor->status.sharpness = 0;
385+
sensor->status.denoise = 0;
386+
sensor->status.ae_level = 0;
387+
sensor->status.awb = 0;
388+
sensor->status.aec = 0;
389+
sensor->status.hmirror = check_reg_mask(sensor->slv_addr, 0x101, 0x01);
390+
sensor->status.vflip = check_reg_mask(sensor->slv_addr, 0x101, 0x02);
391+
sensor->status.lenc = 0;
392+
sensor->status.awb_gain = 0;
393+
sensor->status.agc_gain = 0;
394+
sensor->status.aec_value = 0;
395+
373396
return 0;
374397
}
375398

@@ -399,7 +422,7 @@ int hm0360_init(sensor_t *sensor)
399422
sensor->set_brightness = set_brightness;
400423
sensor->set_saturation = set_dummy;
401424
sensor->set_sharpness = set_dummy;
402-
sensor->set_gainceiling = set_dummy;
425+
sensor->set_gainceiling = set_gainceiling_dummy;
403426
sensor->set_quality = set_dummy;
404427
sensor->set_colorbar = set_colorbar;
405428
sensor->set_gain_ctrl = set_dummy;

sensors/hm1055.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,6 @@ static int set_ae_level(sensor_t *sensor, int level)
407407
return 0;
408408
}
409409

410-
static int set_awb_gain_dsp(sensor_t *sensor, int enable)
411-
{
412-
return 0;
413-
}
414-
415410
static int set_brightness(sensor_t *sensor, int level)
416411
{
417412
int ret = 0;
@@ -467,7 +462,6 @@ static int set_contrast(sensor_t *sensor, int level)
467462
{
468463
int ret = 0;
469464
uint8_t ispctrl5 = read_reg(sensor->slv_addr, ISPCTRL5);
470-
uint8_t value1 = 0;
471465

472466
ispctrl5 |= 0x80; // enable contrast
473467
ret = write_reg(sensor->slv_addr, ISPCTRL5, ispctrl5);
@@ -755,6 +749,8 @@ static int set_xclk(sensor_t *sensor, int timer, int xclk)
755749

756750
static int init_status(sensor_t *sensor)
757751
{
752+
(void) write_addr_reg;
753+
758754
sensor->status.brightness = 0;
759755
sensor->status.contrast = 0;
760756
sensor->status.saturation = 0;

0 commit comments

Comments
 (0)